From: Mark Stapp Date: Sat, 24 Oct 2020 20:50:35 +0000 (-0400) Subject: Merge pull request #7194 from qlyoung/tracing X-Git-Tag: base_7.6~363 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=cbd492990db19b51a24bdd6e8bfec4f79c0f11d5;p=mirror%2Ffrr.git Merge pull request #7194 from qlyoung/tracing Tracing --- cbd492990db19b51a24bdd6e8bfec4f79c0f11d5 diff --cc lib/thread.c index 012194a47b,9a5453b185..1765de9573 --- a/lib/thread.c +++ b/lib/thread.c @@@ -1163,15 -1177,14 +1177,19 @@@ void thread_cancel_event(struct thread_ * * @param thread task to cancel */ -void thread_cancel(struct thread *thread) +void thread_cancel(struct thread **thread) { - struct thread_master *master = thread->master; + struct thread_master *master; + + if (thread == NULL || *thread == NULL) + return; + + master = (*thread)->master; + frrtrace(9, frr_libfrr, thread_cancel, master, thread->funcname, + thread->schedfrom, thread->schedfrom_line, NULL, thread->u.fd, + thread->u.val, thread->arg, thread->u.sands.tv_sec); + assert(master->owner == pthread_self()); frr_with_mutex(&master->mtx) {