diff options
author | Amitay Isaacs <amitay@gmail.com> | 2021-02-12 19:13:11 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2021-05-28 06:46:29 +0000 |
commit | cb55b68b3e63b438f4695e362ffa8faae47d0aee (patch) | |
tree | 617bccfef0ff24c11b5fdb9d080163f1f4e7f08e /ctdb/wscript | |
parent | dd5972b69916fa08b114193d644faf3ae58c550b (diff) | |
download | samba-cb55b68b3e63b438f4695e362ffa8faae47d0aee.tar.gz |
ctdb-utils: Add tdb_mutex_check utility
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/wscript')
-rw-r--r-- | ctdb/wscript | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ctdb/wscript b/ctdb/wscript index b883990c55e..a9fef9241aa 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -139,6 +139,17 @@ def configure(conf): define='HAVE_PACKETSOCKET', headers='sys/socket.h linux/if_packet.h') + conf.CHECK_CODE('''pthread_mutex_t m; + int pid = 0; + m.__data.__owner = pid; + ''', + 'HAVE_PTHREAD_INTERNAL_MUTEX_OWNER', + headers='pthread.h', + msg='Checking for internal POSIX mutex owner field') + if not conf.env.HAVE_PTHREAD_INTERNAL_MUTEX_OWNER: + # This is unsupported - please see note in debug_locks.sh + Logs.info('Building without unsupported mutex debugging hack') + if conf.env.standalone_ctdb: conf.SAMBA_CHECK_PERL(mandatory=True) @@ -666,6 +677,12 @@ def build(bld): install_path='${BINDIR}', manpages='ping_pong.1') + if bld.env.HAVE_PTHREAD_INTERNAL_MUTEX_OWNER: + bld.SAMBA_BINARY('tdb_mutex_check', + source='utils/tdb/tdb_mutex_check.c', + deps='tdb pthread', + install_path='${CTDB_HELPER_BINDIR}') + if bld.env.HAVE_PMDA: bld.SAMBA_BINARY('pmdactdb', source='utils/pmda/pmda_ctdb.c', |