version 1.1, 2012/02/21 17:26:12
|
version 1.1.1.2, 2012/10/09 09:22:28
|
Line 248 cpu_record_hash_free (void *a)
|
Line 248 cpu_record_hash_free (void *a)
|
XFREE (MTYPE_THREAD_STATS, hist); |
XFREE (MTYPE_THREAD_STATS, hist); |
} |
} |
|
|
static inline void | static void |
vty_out_cpu_thread_history(struct vty* vty, |
vty_out_cpu_thread_history(struct vty* vty, |
struct cpu_thread_history *a) |
struct cpu_thread_history *a) |
{ |
{ |
Line 608 thread_master_free (struct thread_master *m)
|
Line 608 thread_master_free (struct thread_master *m)
|
} |
} |
|
|
/* Thread list is empty or not. */ |
/* Thread list is empty or not. */ |
static inline int | static int |
thread_empty (struct thread_list *list) |
thread_empty (struct thread_list *list) |
{ |
{ |
return list->head ? 0 : 1; |
return list->head ? 0 : 1; |
Line 972 static unsigned int
|
Line 972 static unsigned int
|
thread_timer_process (struct thread_list *list, struct timeval *timenow) |
thread_timer_process (struct thread_list *list, struct timeval *timenow) |
{ |
{ |
struct thread *thread; |
struct thread *thread; |
|
struct thread *next; |
unsigned int ready = 0; |
unsigned int ready = 0; |
|
|
for (thread = list->head; thread; thread = thread->next) | for (thread = list->head; thread; thread = next) |
{ |
{ |
|
next = thread->next; |
if (timeval_cmp (*timenow, thread->u.sands) < 0) |
if (timeval_cmp (*timenow, thread->u.sands) < 0) |
return ready; |
return ready; |
thread_list_delete (list, thread); |
thread_list_delete (list, thread); |
Line 991 static unsigned int
|
Line 993 static unsigned int
|
thread_process (struct thread_list *list) |
thread_process (struct thread_list *list) |
{ |
{ |
struct thread *thread; |
struct thread *thread; |
|
struct thread *next; |
unsigned int ready = 0; |
unsigned int ready = 0; |
|
|
for (thread = list->head; thread; thread = thread->next) | for (thread = list->head; thread; thread = next) |
{ |
{ |
|
next = thread->next; |
thread_list_delete (list, thread); |
thread_list_delete (list, thread); |
thread->type = THREAD_READY; |
thread->type = THREAD_READY; |
thread_list_add (&thread->master->ready, thread); |
thread_list_add (&thread->master->ready, thread); |