2 CTDB cluster mutex handling
4 Copyright (C) Andrew Tridgell 2007
5 Copyright (C) Ronnie Sahlberg 2007
6 Copyright (C) Martin Schwenke 2016
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, see <http://www.gnu.org/licenses/>.
22 #ifndef __CTDB_CLUSTER_MUTEX_H__
23 #define __CTDB_CLUSTER_MUTEX_H__
28 #include "system/network.h"
30 #include "ctdb_private.h"
32 struct ctdb_cluster_mutex_handle
;
34 typedef void (*cluster_mutex_handler_t
) (
39 typedef void (*cluster_mutex_lost_handler_t
) (void *private_data
);
41 struct ctdb_cluster_mutex_handle
*
42 ctdb_cluster_mutex(TALLOC_CTX
*mem_ctx
,
43 struct ctdb_context
*ctdb
,
44 const char *argstring
,
46 cluster_mutex_handler_t handler
,
48 cluster_mutex_lost_handler_t lost_handler
,
51 #endif /* __CTDB_CLUSTER_MUTEX_H__ */