diff 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
line wrap: on
line diff
--- a/runtime/transaction.h	Wed Jul 27 21:32:40 2011 -0700
+++ b/runtime/transaction.h	Fri Oct 07 00:10:02 2011 -0700
@@ -33,8 +33,19 @@
 #include "context.h"
 
 trans_cell * find_obj_cell(transaction * trans, mutable_object * to_find);
+#ifdef RAW_FUNC
+#define begin_transaction(ct, numobjs, ...) real_begin_transaction(numobjs, __VA_ARGS__)
+void real_begin_transaction(int numobjs,...);
+#define commit_transaction(ct, readonly) real_commit_transaction(readonly)
+int32_t real_commit_transaction(int32_t readonly);
+#define prep_retry(ct) real_prep_retry()
+void prep_retry();
+extern transaction * cur_transaction;
+#else
 void begin_transaction(struct context * ct, int numobjs,...);
 int32_t commit_transaction(struct context * ct, int32_t readonly);
 void prep_retry(struct context * ct);
+#define cur_transaction ct->transaction
+#endif
 
 #endif //TRANSACTION_H_