diff options
author | Mark Stapp <mjs@voltanet.io> | 2020-07-17 23:09:51 +0200 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2020-10-23 18:16:52 +0200 |
commit | 5047884528ec263215504cb5df12ebd2422cc392 (patch) | |
tree | 952121f1a904ef9c86c1f7336a3aae757eeb3434 /lib/thread.c | |
parent | * : update signature of thread_cancel api (diff) | |
download | frr-5047884528ec263215504cb5df12ebd2422cc392.tar.xz frr-5047884528ec263215504cb5df12ebd2422cc392.zip |
*: unify thread/event cancel macros
Replace all lib/thread cancel macros, use thread_cancel()
everywhere. Only the THREAD_OFF macro and thread_cancel() api are
supported. Also adjust thread_cancel_async() to NULL caller's pointer (if
present).
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/thread.c')
-rw-r--r-- | lib/thread.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/thread.c b/lib/thread.c index 90c6c6f0a..012194a47 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -1234,6 +1234,9 @@ void thread_cancel_async(struct thread_master *master, struct thread **thread, while (!master->canceled) pthread_cond_wait(&master->cancel_cond, &master->mtx); } + + if (thread) + *thread = NULL; } /* ------------------------------------------------------------------------- */ |