Cleanup: Re-organise source dir Re-organise the sources, add a top level "src" and "include" dir and move relevant files. Disable autotools automated includes and define them manually. This fixes problems with collision of header names with system headers. Include the autoconf config.h in the default includes and remove it where it's explicitely included. Remove _GNU_SOURCE defines since it's detected at configure for platforms that requires it and added to the config.h. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add rcu_read_ongoing() API to each urcu flavor This will allow checking whether: - thread is online (QSBR), - thread is nested within read-side critical section (other flavors), This is useful for libraries that need to know if QSBR is online in order to save the original state temporarily so it can be restored before returning to the caller. Eventually, this API can be called by a "debugging" implementation of rcu_dereference() and other urcu-pointer.h API members to check that no RCU pointer is read outside of RCU read-side critical sections. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix static linking: fix symbol name namespaces gp_futex, yield_active, rand_yield, has_sys_membarrier, rcu_defer_exit, call_rcu_data_free, call_rcu_before_fork, call_rcu_after_fork_parent, call_rcu_after_fork_child are exported by each urcu flavor. In order to fix use-cases where multiple flavors are statically linked into the same application, we need to move these symbols to local namespaces. Ensure that all symbols are prefixed by "rcu_". Also add each of those symbols into urcu/map/*.h headers, so they get mapped to their flavor-specific symbol name by the preprocessor. This requires bumping our .so version from 1.0.0 to 2.0.0, because it changes some symbol names. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>