annotate runtime/transaction.h @ 138:1411de6050e1

First stab at transaction data structures, needs work
author Mike Pavone <pavone@retrodev.com>
date Tue, 16 Nov 2010 21:53:18 -0500
parents
children a68e6828d896
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
138
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #ifndef THREAD_H_
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2 #define THREAD_H_
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 #include "object.h"
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 typedef struct
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 {
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8 object header;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 object * data;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10 int32_t version;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 } mutable_object;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 typedef struct
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14 {
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15 mutable_object *obj;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
16 object **commit_loc;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
17 int32_t orig_version;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
18 int32_t local_version;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
19 } trans_cell;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
20
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
21
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
22 typedef struct transaction
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
23 {
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
24 struct transaction *parent;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
25 rh_mutex(lock)
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
26 int32_t num_cells;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
27 trans_cell[1] cells;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
28 } transaction;
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
29
1411de6050e1 First stab at transaction data structures, needs work
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
30 #endif //THREAD_H_