urcu tests: hold mutex across use of custom allocator
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 30 Jun 2011 14:45:33 +0000 (10:45 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 30 Jun 2011 14:45:33 +0000 (10:45 -0400)
commitd4267b0b37f1a7d35e23f0d7c045a973f6c3a6aa
tree89c5808343104d1bb9e730d1743d95e63167f76a
parentdc745ef621c02934b89f5c1764fc0c51c51ccb1e
urcu tests: hold mutex across use of custom allocator

A thread preempted for a long period of time could race, when scheduled
again, with another thread that would have been allocating/freeing
entries (thus wrapping-around the available buffer), which would trigger
this race only when overcommitting the number of threads compared to the
number of available CPUs.

Taking the mutex across alloc and free to fix this.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_qsbr.c
tests/test_urcu.c
tests/test_urcu_assign.c
tests/test_urcu_bp.c
This page took 0.02529 seconds and 4 git commands to generate.