]> git.puffer.fish Git - matthieu/frr.git/commit
lib: Slight Optimization of thread handling.
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 10 Nov 2016 18:58:40 +0000 (13:58 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 17 Jan 2017 23:40:33 +0000 (18:40 -0500)
commitb3f5645df3548246fda33853d10ba830e034226a
treec8956f7ca9bb0471ed1b65cbfc669f24b4cdda19
parentcbea873754384c2184bb1ce6909256a4f22c3ca7
lib: Slight Optimization of thread handling.

This commit does these things:

1) Make thread_add_unuse own the setting of THREAD_UNUSED.
2) Move thread->hist finding to to thread_get.
   We are storing the thread->hist even when the thread
   is on the unused.  This means that we check to see
   if the funcname or func have changed and we get new
   history.  Else we've probably just retrieved the last
   unused which has the same func/funcanme.  This is
   a common practice to do THREAD_OFF/THREAD_ON in
   quick succession.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
lib/thread.c