summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-01-29 11:15:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:44:25 -0500
commite46d128bb598dd8b460c8f6ad0236748f9da47bb (patch)
tree120ac42ba7e1bb3441f14357812bb11c1dfe076a /source4/cluster/ctdb/include
parent9676f4ce4c300c8b78f955feec073bcbca67c0c1 (diff)
downloadsamba-e46d128bb598dd8b460c8f6ad0236748f9da47bb.tar.gz
samba-e46d128bb598dd8b460c8f6ad0236748f9da47bb.tar.bz2
samba-e46d128bb598dd8b460c8f6ad0236748f9da47bb.zip
r21044: - merge struct ctdb_call API changes from bzr tree
- convert brlock code to new API (This used to be commit cf317480cb715dbaab87c06f824a1db14b09b298)
Diffstat (limited to 'source4/cluster/ctdb/include')
-rw-r--r--source4/cluster/ctdb/include/ctdb.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/cluster/ctdb/include/ctdb.h b/source4/cluster/ctdb/include/ctdb.h
index f2f4bcef84..8a2006f678 100644
--- a/source4/cluster/ctdb/include/ctdb.h
+++ b/source4/cluster/ctdb/include/ctdb.h
@@ -21,10 +21,17 @@
#ifndef _CTDB_H
#define _CTDB_H
+struct ctdb_call {
+ int call_id;
+ TDB_DATA key;
+ TDB_DATA call_data;
+ TDB_DATA reply_data;
+};
+
/*
- structure passed to a ctdb call function
+ structure passed to a ctdb call backend function
*/
-struct ctdb_call {
+struct ctdb_call_info {
TDB_DATA key; /* record key */
TDB_DATA record_data; /* current data in the record */
TDB_DATA *new_data; /* optionally updated record data */
@@ -85,7 +92,7 @@ int ctdb_start(struct ctdb_context *ctdb);
const char *ctdb_errstr(struct ctdb_context *);
/* a ctdb call function */
-typedef int (*ctdb_fn_t)(struct ctdb_call *);
+typedef int (*ctdb_fn_t)(struct ctdb_call_info *);
/*
setup a ctdb call function
@@ -103,8 +110,7 @@ int ctdb_attach(struct ctdb_context *ctdb, const char *name, int tdb_flags,
make a ctdb call. The associated ctdb call function will be called on the DMASTER
for the given record
*/
-int ctdb_call(struct ctdb_context *ctdb, TDB_DATA key, int call_id,
- TDB_DATA *call_data, TDB_DATA *reply_data);
+int ctdb_call(struct ctdb_context *ctdb, struct ctdb_call *call);
/*
wait for all nodes to be connected - useful for test code