From 5047884528ec263215504cb5df12ebd2422cc392 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Fri, 17 Jul 2020 17:09:51 -0400 Subject: *: 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 --- lib/thread.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/thread.c') 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; } /* ------------------------------------------------------------------------- */ -- cgit v1.2.3