On Sun, 27 Feb 2022 23:32:47 +0000, Lee Shallis wrote: > Yes, as I mentioned before, pauseCB is supposed to have it's pointer > be changed by the developer, in other words you forgot to plugin a > pthreads compatible call prior to your threads starting, considering > you made that mistake I suppose it is a good thing I since switched to > a non-redirectable pointer: How many times do you want to do this? zhasha@wirbelwind /home/zhasha ; gcc -D_GNU_SOURCE -lpthread buglock.c zhasha@wirbelwind /home/zhasha ; ./a.out var = 1, expected 0 zhasha@wirbelwind /home/zhasha ; ./a.out var = 1, expected 0 zhasha@wirbelwind /home/zhasha ; ./a.out var = 1, expected 0 zhasha@wirbelwind /home/zhasha ; ./a.out var = 1, expected 0 zhasha@wirbelwind /home/zhasha ; ./a.out var = 1, expected 0 var = 2, expected 1 zhasha@wirbelwind /home/zhasha ; ./a.out var = 1, expected 0 var = 2, expected 1