X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=src%2Furcu-flavor.h;h=9cfbd6afa420d899cd7a921a83502f53b7fa3fc0;hp=5e7f292514fd389c2982c36c9d51e45265f5fa0d;hb=d0ec0ed2fcb5d67a28587dcb778606e64f5b7b83;hpb=ccacf27fd8d1af069016d7cf3a91f8995af08b8c diff --git a/src/urcu-flavor.h b/src/urcu-flavor.h index 5e7f292..9cfbd6a 100644 --- a/src/urcu-flavor.h +++ b/src/urcu-flavor.h @@ -27,6 +27,16 @@ extern "C" { #endif +struct urcu_atfork { + void (*before_fork)(void *priv); + void (*after_fork_parent)(void *priv); + void (*after_fork_child)(void *priv); + void *priv; +}; + +void urcu_register_rculfhash_atfork(struct urcu_atfork *atfork); +void urcu_unregister_rculfhash_atfork(struct urcu_atfork *atfork); + struct rcu_flavor_struct { void (*read_lock)(void); void (*read_unlock)(void); @@ -43,6 +53,9 @@ struct rcu_flavor_struct { void (*unregister_thread)(void); void (*barrier)(void); + + void (*register_rculfhash_atfork)(struct urcu_atfork *atfork); + void (*unregister_rculfhash_atfork)(struct urcu_atfork *atfork); }; #define DEFINE_RCU_FLAVOR(x) \ @@ -59,6 +72,8 @@ const struct rcu_flavor_struct x = { \ .register_thread = rcu_register_thread, \ .unregister_thread = rcu_unregister_thread,\ .barrier = rcu_barrier, \ + .register_rculfhash_atfork = urcu_register_rculfhash_atfork, \ + .unregister_rculfhash_atfork = urcu_unregister_rculfhash_atfork,\ } extern const struct rcu_flavor_struct rcu_flavor;