summaryrefslogtreecommitdiff
path: root/lib/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thread.h')
-rw-r--r--lib/thread.h25
1 files changed, 3 insertions, 22 deletions
diff --git a/lib/thread.h b/lib/thread.h
index 3440a92999..34adcc4d09 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -23,6 +23,7 @@
#define _ZEBRA_THREAD_H
#include <zebra.h>
+#include "monotime.h"
struct rusage_t
{
@@ -115,6 +116,7 @@ struct cpu_thread_history
{
int (*func)(struct thread *);
unsigned int total_calls;
+ unsigned int total_active;
struct time_stats
{
unsigned long total, max;
@@ -124,11 +126,6 @@ struct cpu_thread_history
const char *funcname;
};
-/* Clocks supported by Quagga */
-enum quagga_clkid {
- QUAGGA_CLK_MONOTONIC = 1, /* monotonic, against an indeterminate base */
-};
-
/* Struct timeval's tv_usec one second value. */
#define TIMER_SECOND_MICRO 1000000L
@@ -238,33 +235,17 @@ extern void thread_call (struct thread *);
extern unsigned long thread_timer_remain_second (struct thread *);
extern struct timeval thread_timer_remain(struct thread*);
extern int thread_should_yield (struct thread *);
-extern unsigned long timeval_elapsed (struct timeval a, struct timeval b);
/* set yield time for thread */
extern void thread_set_yield_time (struct thread *, unsigned long);
/* Internal libfrr exports */
extern void thread_getrusage (RUSAGE_T *);
-extern struct cmd_element show_thread_cpu_cmd;
-extern struct cmd_element clear_thread_cpu_cmd;
-
-/* replacements for the system gettimeofday(), clock_gettime() and
- * time() functions, providing support for non-decrementing clock on
- * all systems, and fully monotonic on /some/ systems.
- */
-extern int quagga_gettime (enum quagga_clkid, struct timeval *);
-extern time_t quagga_monotime (void);
+extern void thread_cmd_init (void);
/* Returns elapsed real (wall clock) time. */
extern unsigned long thread_consumed_time(RUSAGE_T *after, RUSAGE_T *before,
unsigned long *cpu_time_elapsed);
-/* Global variable containing a recent result from gettimeofday. This can
- be used instead of calling gettimeofday if a recent value is sufficient.
- This is guaranteed to be refreshed before a thread is called. */
-extern struct timeval recent_time;
-/* Similar to recent_time, but a monotonically increasing time value */
-extern struct timeval recent_relative_time (void);
-
/* only for use in logging functions! */
extern struct thread *thread_current;