# HG changeset patch # User Mike Pavone # Date 1289962398 18000 # Node ID 1411de6050e153321dbad8e6e61da6f9b9948d0f # Parent daf1ffaf7c2c734c82ab0f206538010856adcfea First stab at transaction data structures, needs work diff -r daf1ffaf7c2c -r 1411de6050e1 runtime/transaction.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/runtime/transaction.h Tue Nov 16 21:53:18 2010 -0500 @@ -0,0 +1,30 @@ +#ifndef THREAD_H_ +#define THREAD_H_ + +#include "object.h" + +typedef struct +{ + object header; + object * data; + int32_t version; +} mutable_object; + +typedef struct +{ + mutable_object *obj; + object **commit_loc; + int32_t orig_version; + int32_t local_version; +} trans_cell; + + +typedef struct transaction +{ + struct transaction *parent; + rh_mutex(lock) + int32_t num_cells; + trans_cell[1] cells; +} transaction; + +#endif //THREAD_H_