X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Fexternal-agent.h;h=9d25c58296ce57f42a8ea6ce9fbd3855f7ae8e52;hb=fbae37ba91ec230e34be564084099726cc3a9d47;hp=b5d6c31e1cfa5a875cc1187d28014d4dd8c7be5e;hpb=c56e2b1b5e51b094d53f4012e226b352a91618f6;p=ccan diff --git a/ccan/tdb2/test/external-agent.h b/ccan/tdb2/test/external-agent.h index b5d6c31e..9d25c582 100644 --- a/ccan/tdb2/test/external-agent.h +++ b/ccan/tdb2/test/external-agent.h @@ -5,12 +5,14 @@ * various times. */ enum operation { OPEN, + OPEN_WITH_HOOK, FETCH, STORE, TRANSACTION_START, TRANSACTION_COMMIT, NEEDS_RECOVERY, CHECK, + SEND_SIGNAL, CLOSE, }; @@ -33,6 +35,9 @@ enum agent_return external_agent_operation(struct agent *handle, enum operation op, const char *name); +/* Hook into free() on tdb_data in external agent. */ +void (*external_agent_free)(void *); + /* Mapping enum -> string. */ const char *agent_return_name(enum agent_return ret); const char *operation_name(enum operation op);