Mercurial > repos > rhope
comparison runtime/transaction.h @ 186:ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 07 Oct 2011 00:10:02 -0700 |
parents | a68e6828d896 |
children |
comparison
equal
deleted
inserted
replaced
185:4580c08fd4e8 | 186:ba35ab624ec2 |
---|---|
31 } transaction; | 31 } transaction; |
32 | 32 |
33 #include "context.h" | 33 #include "context.h" |
34 | 34 |
35 trans_cell * find_obj_cell(transaction * trans, mutable_object * to_find); | 35 trans_cell * find_obj_cell(transaction * trans, mutable_object * to_find); |
36 #ifdef RAW_FUNC | |
37 #define begin_transaction(ct, numobjs, ...) real_begin_transaction(numobjs, __VA_ARGS__) | |
38 void real_begin_transaction(int numobjs,...); | |
39 #define commit_transaction(ct, readonly) real_commit_transaction(readonly) | |
40 int32_t real_commit_transaction(int32_t readonly); | |
41 #define prep_retry(ct) real_prep_retry() | |
42 void prep_retry(); | |
43 extern transaction * cur_transaction; | |
44 #else | |
36 void begin_transaction(struct context * ct, int numobjs,...); | 45 void begin_transaction(struct context * ct, int numobjs,...); |
37 int32_t commit_transaction(struct context * ct, int32_t readonly); | 46 int32_t commit_transaction(struct context * ct, int32_t readonly); |
38 void prep_retry(struct context * ct); | 47 void prep_retry(struct context * ct); |
48 #define cur_transaction ct->transaction | |
49 #endif | |
39 | 50 |
40 #endif //TRANSACTION_H_ | 51 #endif //TRANSACTION_H_ |