1 #ifndef _DS_STORE_H_ 2 #define _DS_STORE_H_ 3 4 /* Type definitions for the Data Store Server. */ 5 #include <sys/types.h> 6 #include <minix/config.h> 7 #include <minix/ds.h> 8 #include <minix/bitmap.h> 9 #include <minix/param.h> 10 #include <regex.h> 11 12 #define NR_DS_KEYS (2*NR_SYS_PROCS) /* number of entries */ 13 #define NR_DS_SUBS (4*NR_SYS_PROCS) /* number of subscriptions */ 14 15 /* Base 'class' for the following 3 structs. */ 16 struct data_store { 17 int flags; 18 char key[DS_MAX_KEYLEN]; /* key to lookup information */ 19 char owner[DS_MAX_KEYLEN]; 20 21 union dsi_u { 22 unsigned u32; 23 struct dsi_mem { 24 void *data; 25 size_t length; 26 size_t reallen; 27 } mem; 28 } u; 29 }; 30 31 struct subscription { 32 int flags; 33 char owner[DS_MAX_KEYLEN]; 34 regex_t regex; 35 bitchunk_t old_subs[BITMAP_CHUNKS(NR_DS_KEYS)]; 36 }; 37 38 #endif /* _DS_STORE_H_ */ 39