From a3881a9c2fbc9e6a58bfeadbccba819979d94937 Mon Sep 17 00:00:00 2001 From: sasha Date: Mon, 22 Oct 2007 09:29:04 +0000 Subject: - [ZBX-102] Distributed monitoring: overwriting information (Sasha) [svn merge svn://svn.zabbix.com/branches/1.4.j -r4885:4887] git-svn-id: svn://svn.zabbix.com/trunk@4888 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- include/common.h | 3 ++- include/mutexs.h | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/common.h b/include/common.h index 14fdd00b..f069fda0 100644 --- a/include/common.h +++ b/include/common.h @@ -559,7 +559,8 @@ int zbx_pg_unescape_bytea(u_char *io); char *zbx_get_next_field(const char *line, char **output, int *olen, char separator); int str_in_list(char *list, const char *value, const char delimiter); -int lock_sync_node(int nodeid); +void node_sync_lock(int nodeid); +void node_sync_unlock(int nodeid); int calculate_checksums(int nodeid, const char *tablename, const zbx_uint64_t id); int update_checksums(int nodeid, int synked_slave, int synked_master, const char *tablename, const zbx_uint64_t id, char *fields); diff --git a/include/mutexs.h b/include/mutexs.h index 6cf72054..83c5075b 100644 --- a/include/mutexs.h +++ b/include/mutexs.h @@ -29,6 +29,7 @@ # define ZBX_MUTEX_NAME char* # define ZBX_MUTEX_LOG "ZBX_MUTEX_LOG" +# define ZBX_MUTEX_NODE_SYNC "ZBX_MUTEX_NODE_SYNC" #else /* not _WINDOWS */ @@ -40,9 +41,10 @@ # define ZBX_MUTEX_NAME int # define ZBX_MUTEX_LOG 0 -# define ZBX_MUTEX_CACHE 1 +# define ZBX_MUTEX_NODE_SYNC 1 +# define ZBX_MUTEX_CACHE 2 /* This has to be the last MUTEX in the list with MAX number */ -# define ZBX_MUTEX_COUNT 2 +# define ZBX_MUTEX_COUNT 3 # define ZBX_MUTEX_MAX_TRIES 20 /* seconds */ -- cgit