]> git.puffer.fish Git - matthieu/frr.git/commit
lib: change thread_add_* API
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 6 Oct 2021 19:06:23 +0000 (22:06 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 20 Oct 2021 17:07:15 +0000 (20:07 +0300)
commitee1455dd983e2b19018890c2da5e22bb97b3adb7
tree2ad4cece5e23cd14e95073f5d35549d61b3e0b8b
parent5db95752c063a46a6ee8cdf5e65d45c68a8de77f
lib: change thread_add_* API

Do not return pointer to the newly created thread from various thread_add
functions. This should prevent developers from storing a thread pointer
into some variable without letting the lib know that the pointer is
stored. When the lib doesn't know that the pointer is stored, it doesn't
prevent rescheduling and it can lead to hard to find bugs. If someone
wants to store the pointer, they should pass a double pointer as the last
argument.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
lib/thread.c
lib/thread.h
lib/vty.c
ospfd/ospf_lsa.c
ospfd/ospf_lsa.h
zebra/zebra_netns_notify.c