summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-12-04 11:15:20 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2010-12-04 11:15:20 -0500
commit5e90aecd290f5ae8b4b10367cc0d8995be2a1d9d (patch)
treec60abe4025d03517d3a685076e32aa3fc48093a0 /include
parent1c98f161a0e110b52e1000e731e0fc7bcb4d31b0 (diff)
New argument to transactional free functions, to specify whether we are about to retry
Diffstat (limited to 'include')
-rw-r--r--include/types.h1
-rw-r--r--include/urweb.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/types.h b/include/types.h
index ac70c34f..e5edab96 100644
--- a/include/types.h
+++ b/include/types.h
@@ -51,6 +51,7 @@ typedef struct input *uw_input;
#define TIMES_MAX 100
typedef void (*uw_callback)(void *);
+typedef void (*uw_callback_with_retry)(void *, int will_retry);
typedef void (*uw_logger)(void*, const char *fmt, ...);
typedef struct {
diff --git a/include/urweb.h b/include/urweb.h
index 4816537a..f63b3f4c 100644
--- a/include/urweb.h
+++ b/include/urweb.h
@@ -39,7 +39,7 @@ failure_kind uw_begin(uw_context, char *path);
failure_kind uw_begin_onError(uw_context, char *msg);
void uw_login(uw_context);
void uw_commit(uw_context);
-int uw_rollback(uw_context);
+int uw_rollback(uw_context, int will_retry);
__attribute__((noreturn)) void uw_error(uw_context, failure_kind, const char *fmt, ...);
char *uw_error_message(uw_context);
@@ -228,7 +228,7 @@ uw_Basis_time uw_Basis_now(uw_context);
uw_Basis_time uw_Basis_minusSeconds(uw_context, uw_Basis_time, uw_Basis_int);
extern const uw_Basis_time uw_Basis_minTime;
-void uw_register_transactional(uw_context, void *data, uw_callback commit, uw_callback rollback, uw_callback free);
+void uw_register_transactional(uw_context, void *data, uw_callback commit, uw_callback rollback, uw_callback_with_retry free);
void uw_check_heap(uw_context, size_t extra);
char *uw_heap_front(uw_context);