* Paolo Bonzini ([email protected]) wrote: > On 03/09/2011 02:02 PM, Mathieu Desnoyers wrote: >> void call_rcu_before_fork_parent(void) >> pthread_mutex_lock(&call_rcu_mutex); >> >> void call_rcu_after_fork_parent(void) >> pthread_mutex_unlock(&call_rcu_mutex); >> >> void call_rcu_after_fork_child(void) >> allocate new default call_rcu_data >> dispose of old structures >> pthread_mutex_unlock(&call_rcu_mutex); > > These are just the three arguments to pthread_atfork, so they could be > replaced by a single call_rcu_init_atfork that calls pthread_atfork.
I'm just concerned about the execution order of the atfork callbacks. If we provide the callbacks directly, then the application can take care to call the various callbacks in a known order (e.g. first execute the call_rcu functions, and then the RCU lib functions). If we use atfork, the order will be pretty much random, and I'm not sure I like that. Thanks, Mathieu -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com _______________________________________________ ltt-dev mailing list [email protected] http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
