9 enum status {CLEAN, DIRTY};
11 typedef struct objheader {
14 unsigned short version;
15 unsigned short rcount;
19 typedef struct objstr {
20 unsigned int size; //this many bytes are allocated after this header
25 typedef struct transrecord {
27 hashtable_t *lookupTable;
30 /* Initialize main object store and lookup tables, start server thread. */
33 /* Prototypes for object header */
34 unsigned int getNewOID(void);
35 unsigned int objSize(objheader_t *object);
36 /* end object header */
38 /* Prototypes for object store */
39 objstr_t *objstrCreate(unsigned int size); //size in bytes
40 void objstrDelete(objstr_t *store); //traverse and free entire list
41 void *objstrAlloc(objstr_t *store, unsigned int size); //size in bytes
42 /* end object store */
44 /* Prototypes for server portion */
46 void *dstmAccept(void *);
47 /* end server portion */
49 /* Prototypes for transactions */
50 transrecord_t *transStart();
51 objheader_t *transRead(transrecord_t *record, unsigned int oid);
52 objheader_t *transCreateObj(transrecord_t *record, unsigned short type); //returns oid
53 int transCommit(transrecord_t *record); //return 0 if successful
54 /* end transactions */