00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __HASHMAP_H
00020 #define __HASHMAP_H
00021
00022 #include "common/ktypes.h"
00023 #include "common/kconst.h"
00024
00025 #define WIND_TYPE 1
00026 #define FRM_TYPE 2
00027 #define COMP_TYPE 3
00028
00029 typedef struct
00030 {
00031 DB avl;
00032 DW key;
00033 DW val;
00034 } PAIR;
00035
00036 extern PAIR win_map[MAX_PROC][WINDOW_MAX];
00037 extern PAIR frm_map[MAX_PROC][FRAME_MAX];
00038 extern PAIR comp_map[MAX_PROC][COMPONENT_MAX];
00039
00040 extern DW win_map_max[MAX_PROC];
00041 extern DW frm_map_max[MAX_PROC];
00042 extern DW comp_map_max[MAX_PROC];
00043
00044 void hash_init();
00045
00046 SDW hadd(DW pid, DB type, DW key, DW val);
00047 SDW hremove(DW pid, DB type, DW key);
00048 void hremoveAll(DW pid);
00049 SDW hfind(DW pid, DB type, DW key);
00050 SDW afind(DW pid, DB type, DW val);
00051
00052 void printHash(DW pid, DB type);
00053
00054 #endif