]> git.puffer.fish Git - mirror/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>
Thu, 22 Dec 2016 01:26:14 +0000 (20:26 -0500)
commita2012b80b1e045c94e6c93a2f959df75d9ce1fa3
tree12806f3515a92f1b07229471bbf427e84a608d39
parent1405c852fc8545266ed775f18a3ed97e09200eb5
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