summaryrefslogtreecommitdiffstats
path: root/lib/thread.h
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-07-25 22:40:40 +0200
committerPaul Jakma <paul.jakma@sun.com>2006-07-25 22:40:40 +0200
commitcc8b13a00bfe7083ae68755e547a39cd762f2963 (patch)
tree9729858115e6862a6bc65a5454f41ce01e059306 /lib/thread.h
parent[ospfd] record timestamp and event of last NSM state change for neighbour (diff)
downloadfrr-cc8b13a00bfe7083ae68755e547a39cd762f2963.tar.xz
frr-cc8b13a00bfe7083ae68755e547a39cd762f2963.zip
[lib] Optimise thread_call by caching pointer to thread history in the thread
2006-07-25 Paul Jakma <paul.jakma@sun.com> * thread.h: (struct thread) Add a cache pointer to the struct cpu_thread_history, if it is known - saving hash lookup on each thread_call. * thread.c: (thread_call) Cache the pointer to the cpu_thread_history, so that future thread_calls of same thread can avoid the hash_lookup.
Diffstat (limited to 'lib/thread.h')
-rw-r--r--lib/thread.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/thread.h b/lib/thread.h
index f693ff5ab..0670a890f 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -80,6 +80,7 @@ struct thread
struct timeval sands; /* rest of time sands value. */
} u;
RUSAGE_T ru; /* Indepth usage info. */
+ struct cpu_thread_history *hist; /* cache pointer to cpu_history */
char* funcname;
};