view 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
line wrap: on
line source

#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_