Mercurial > repos > rhope
comparison 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 |
comparison
equal
deleted
inserted
replaced
137:daf1ffaf7c2c | 138:1411de6050e1 |
---|---|
1 #ifndef THREAD_H_ | |
2 #define THREAD_H_ | |
3 | |
4 #include "object.h" | |
5 | |
6 typedef struct | |
7 { | |
8 object header; | |
9 object * data; | |
10 int32_t version; | |
11 } mutable_object; | |
12 | |
13 typedef struct | |
14 { | |
15 mutable_object *obj; | |
16 object **commit_loc; | |
17 int32_t orig_version; | |
18 int32_t local_version; | |
19 } trans_cell; | |
20 | |
21 | |
22 typedef struct transaction | |
23 { | |
24 struct transaction *parent; | |
25 rh_mutex(lock) | |
26 int32_t num_cells; | |
27 trans_cell[1] cells; | |
28 } transaction; | |
29 | |
30 #endif //THREAD_H_ |