X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=README;h=7d97f1964674407ddb23c069e3024ea7dc2cfdd7;hb=0376e7b2f8d26778ebc4750b34e718c062c92764;hp=56e98d768e960ede0a80245a8a1a725218de33d4;hpb=81ad2e193e8072f8246212d7eaba72769306c2e4;p=userspace-rcu.git diff --git a/README b/README index 56e98d7..7d97f19 100644 --- a/README +++ b/README @@ -124,16 +124,15 @@ Writing Usage of liburcu-defer - * #include - * Link with "-lurcu-defer", and also with one of the urcu library - (either urcu, urcu-bp, urcu-mb or urcu-qsbr). + * Follow instructions for either liburcu, liburcu-qsbr, + liburcu-mb, liburcu-signal, or liburcu-bp above. + The liburcu-defer functionality is pulled into each of + those library modules. * Provides defer_rcu() primitive to enqueue delayed callbacks. Queued callbacks are executed in batch periodically after a grace period. Do _not_ use defer_rcu() within a read-side critical section, because it may call synchronize_rcu() if the thread queue is full. - * Provides defer_rcu_ratelimit() primitive, which acts just like - defer_rcu(), but takes an additional rate limiter callback forcing - synchronized callback execution of the limiter returns non-zero. + This can lead to deadlock or worse. * Requires that rcu_defer_barrier() must be called in library destructor if a library queues callbacks and is expected to be unloaded with dlclose(). @@ -205,6 +204,9 @@ Interaction with fork() rcu_bp_before_fork, rcu_bp_after_fork_parent and rcu_bp_after_fork_child. - Applications that use call_rcu() are required to invoke - call_rcu_after_fork_child() from the child process after a - successful fork() system call that is not followed by exec(). + Applications that use call_rcu() and that fork() without + doing an immediate exec() must take special action. The parent + must invoke call_rcu_before_fork() before the fork() and + call_rcu_after_fork_parent() after the fork(). The child + process must invoke call_rcu_after_fork_child(). + These three APIs are suitable for passing to pthread_atfork().