process shared mutexes?

Konstantin Belousov kostikbel at gmail.com
Mon Nov 21 13:50:43 UTC 2016


On Mon, Nov 21, 2016 at 02:35:28PM +0100, Volker Lendecke wrote:
> Hello!
> 
> For Samba's tdb I'm trying to get process shared robust mutexes to
> work. However, tdb has a usage pattern that seems to confuse FreeBSD
> 11 (32-bit x86 if that matters).
> 
> The attached program fails in the final pthread_mutex_lock call. If I
> comment out the call to
> 
> ptr = mmap(NULL, 0xb0, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x1000);
> 
> it works.
> 
> FWIW, tdb uses robust shared mutexes on Linux successfully for a while
> now. I haven't tried Solaris yet, the only other platform I know about
> that has them.
> 
> What am I doing wrong?
> 
> Thanks,
> 

There is no attached program, please mail it either inline or put it
somewhere on web.


More information about the freebsd-hackers mailing list