Re: futex(2) not working in inherited mmap'd anon memory

2021-11-19 Thread Thomas Munro
On Fri, Nov 5, 2021 at 9:19 AM Thomas Munro wrote: > On Tue, Oct 26, 2021 at 11:29 PM Thomas Munro wrote: > > When I do mmap(MAP_ANONYMOUS | MAP_SHARED) and then fork(), it seems > > that futex(2) wakeups are not delivered between child and parent in > > that memory. It does work as expected if

Re: futex(2) not working in inherited mmap'd anon memory

2021-11-04 Thread Thomas Munro
On Tue, Oct 26, 2021 at 11:29 PM Thomas Munro wrote: > When I do mmap(MAP_ANONYMOUS | MAP_SHARED) and then fork(), it seems > that futex(2) wakeups are not delivered between child and parent in > that memory. It does work as expected if I instead use > shmget(IPC_PRIVATE). Hello, This seems to

futex(2) not working in inherited mmap'd anon memory

2021-10-26 Thread Thomas Munro
Hello, When I do mmap(MAP_ANONYMOUS | MAP_SHARED) and then fork(), it seems that futex(2) wakeups are not delivered between child and parent in that memory. It does work as expected if I instead use shmget(IPC_PRIVATE). Below is a standalone test program. I tested it with the four OSes