In a non-controlled startup, the rcu data structures were
not being created until after logging could happen. This
is bad. Move it so that the rcu data structures are
created first, before logging( HA! ) can happen.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
int frr_pthread_non_controlled_startup(pthread_t thread, const char *name,
const char *os_name)
{
+ struct rcu_thread *rcu_thread = rcu_thread_new(NULL);
+
+ rcu_thread_start(rcu_thread);
+
struct frr_pthread_attr attr = {
.start = frr_pthread_attr_non_controlled_start,
.stop = frr_pthread_attr_default.stop,
return -1;
fpt->thread = thread;
- fpt->rcu_thread = rcu_thread_new(NULL);
+ fpt->rcu_thread = rcu_thread;
frr_pthread_inner(fpt);
return 0;