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>
userspace-rcu tests: zero array before using It seems like we need the test arrays to start out zeroed. Without this patch, I get errors like this when running the tests: test_urcu: test_urcu.c:201: test_array_alloc: Assertion `test_array[index].a == 0xDEADBEEF || test_array[index].a == 0' failed. Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Rename all arch primitives with prefix caa_ This is the second patch for reducing namespace pollution. The caa_ prefix stands for Concurrent Architecture Abstraction. Again, suggested by Mathieu Desnoyers and Paul E. Mckenney. Every define, macro and function specific to the architecture abstraction of liburcu is modified with that prefix Signed-off-by: David Goulet <david.goulet@polymtl.ca> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Rename all memory primitives with prefix cmm_ In order to not pollute the userspace namespace for application using liburcu or any lib/apps linked with urcu, this patch if the first of three major refactor for naming convention. The cmm_ prefix is a short name for Concurrent Memory Model and was suggested by Mathieu Desnoyers and Paul E. Mckenney. Every memory primitives such as mb, wmb, rmb, and so on are renamed. Signed-off-by: David Goulet <david.goulet@polymtl.ca> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cleanup headers * atomic_ -> uatomic (to remove namespace clash with libkcompat) * moved arch.h, compiler.h, arch_uatomic.h to /usr/include/urcu/ to make sure we do not pollute system headers. Also add call_rcu() documentation to README. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>