Re: Test-lock hang (not 100% reproducible) on GNU/Linux

2016-12-24 Thread Bruno Haible
Hi Pádraig, > Wow that's much better on a 40 core system: > > Before your patch: > = > $ time ./test-lock > Starting test_lock ... OK > Starting test_rwlock ... OK > Starting test_recursive_lock ... OK > Starting test_once ... OK > > real1m32.547s > user1m32.455s > sys

Re: Test-lock hang (not 100% reproducible) on GNU/Linux

2016-12-24 Thread Pádraig Brady
On 24/12/16 17:52, Bruno Haible wrote: > Hi Pádraig, > >> Wow that's much better on a 40 core system: >> >> Before your patch: >> = >> $ time ./test-lock >> Starting test_lock ... OK >> Starting test_rwlock ... OK >> Starting test_recursive_lock ... OK >> Starting test_once ... OK

Re: Test-lock hang (not 100% reproducible) on GNU/Linux

2016-12-24 Thread Bruno Haible
> > What happens when a program reads from a 'volatile' variable > > at address xy in a multi-processor system? Looking at the assembler code produced by GCC: GCC does not emit any barrier or similar instructions for reads or writes to 'volatile' variables. So, the loop in test_lock actually waits