tdb: Fix mutexes on FreeBSD
authorVolker Lendecke <vl@samba.org>
Mon, 21 Nov 2016 20:00:01 +0000 (21:00 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 29 Nov 2016 22:59:52 +0000 (23:59 +0100)
commit275d9fc7d943048c5e580e656b6ad85b8fc6cc14
tree5820dbefe5b7648c50916d8089dd95cb44cede5e
parent5ce95abf37d5646dd5a6ed9acc018f0ab5d1023c
tdb: Fix mutexes on FreeBSD

susv4 on mmap has the following snippet:

> The state of synchronization objects such as mutexes, semaphores,
> barriers, and conditional variables placed in shared memory mapped
> with MAP_SHARED becomes undefined when the last region in any process
> containing the synchronization object is unmapped.

This means we can't keep the mutex mmap area unmapped at any point
in time.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12455

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 29 23:59:52 CET 2016 on sn-devel-144
lib/tdb/common/mutex.c