vm: util.S not used currently; leave it out.
[minix.git] / servers / ds / store.h
blob1ef27172921a14fe7f86ea2ef0b7701d7c001fa1
1 #ifndef _DS_STORE_H_
2 #define _DS_STORE_H_
4 /* Type definitions for the Data Store Server. */
5 #include <sys/types.h>
6 #include <minix/sys_config.h>
7 #include <minix/ds.h>
8 #include <minix/bitmap.h>
9 #include <regex.h>
11 #define NR_DS_KEYS 64 /* number of entries */
12 #define NR_DS_SUBS (4*_NR_SYS_PROCS) /* number of subscriptions */
13 #define NR_DS_SNAPSHOT 5 /* number of snapshots */
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];
21 union {
22 unsigned u32;
23 struct {
24 void *data;
25 size_t length;
26 size_t reallen;
27 } mem;
28 struct dsi_map {
29 void *data;
30 size_t length;
31 void *realpointer;
32 void *snapshots[NR_DS_SNAPSHOT];
33 int sindex;
34 } map;
35 } u;
38 struct subscription {
39 int flags;
40 char owner[DS_MAX_KEYLEN];
41 regex_t regex;
42 bitchunk_t old_subs[BITMAP_CHUNKS(NR_DS_KEYS)];
45 #endif /* _DS_STORE_H_ */