
Hi Glenn, Glenn Schrader wrote:
I ran across this bug while running on a 2.6.9 Linux kernel. Since that kernel version doesn't have native interprocess mutexes and condition variables the interprocess library uses some emulation code. The x86 verion of the emulated semaphore uses atomic_dec32() from atomic.hpp but that function wasn't behaving properly. The following change in oost/interprocess/detail/atomic.hpp made things work properly:
Thanks for the change. However, I'm pretty sure that Linux has process-shared mutexes and condition variables. This might be a bug from the last version. Can you check against the CVS code? I will apply your patch ASAP to CVS. This really shows that atomic functions in hands of non expert people like me are really dangerous! Let's hope we can see soon an atomic operations library in Boost. Regards, Ion