diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-08-07 16:45:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-07 16:45:02 -0400 |
| commit | 3a738964ec92473c21a5fe75a7fa8de28a344ff8 (patch) | |
| tree | 8ffa1246ec49faa93af4754b1c5924140e703e11 /lib/thread.h | |
| parent | 1825b8a216158fa0420239ff6bf73f6a07ad854e (diff) | |
| parent | 77faa5bd79cca6d6e059526da61074ac8d0a3895 (diff) | |
Merge pull request #4763 from opensourcerouting/ds-work
lib: get rid of pqueue_*, use DECLARE_HEAP in thread.c
Diffstat (limited to 'lib/thread.h')
| -rw-r--r-- | lib/thread.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/thread.h b/lib/thread.h index 7897265120..412a4d93bf 100644 --- a/lib/thread.h +++ b/lib/thread.h @@ -41,8 +41,7 @@ struct rusage_t { #define GETRUSAGE(X) thread_getrusage(X) PREDECL_LIST(thread_list) - -struct pqueue; +PREDECL_HEAP(thread_timer_list) struct fd_handler { /* number of pfd that fit in the allocated space of pfds. This is a @@ -73,7 +72,7 @@ struct thread_master { struct thread **read; struct thread **write; - struct pqueue *timer; + struct thread_timer_list_head timer; struct thread_list_head event, ready, unuse; struct list *cancel_req; bool canceled; @@ -95,6 +94,7 @@ struct thread { uint8_t type; /* thread type */ uint8_t add_type; /* thread type */ struct thread_list_item threaditem; + struct thread_timer_list_item timeritem; struct thread **ref; /* external reference (if given) */ struct thread_master *master; /* pointer to the struct thread_master */ int (*func)(struct thread *); /* event function */ @@ -104,7 +104,6 @@ struct thread { int fd; /* file descriptor in case of r/w */ struct timeval sands; /* rest of time sands value. */ } u; - int index; /* queue position for timers */ struct timeval real; struct cpu_thread_history *hist; /* cache pointer to cpu_history */ unsigned long yield; /* yield time in microseconds */ |
