Changeset 37c57f2 in mainline for generic/src/proc/task.c
- Timestamp:
- 2006-03-16T20:56:22Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ff14c520
- Parents:
- 6a22fcb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/proc/task.c
r6a22fcb r37c57f2 39 39 #include <ipc/ipc.h> 40 40 #include <memstr.h> 41 #include <print.h> 41 42 42 43 #include <elf.h> … … 132 133 return task; 133 134 } 135 136 /** Print task list */ 137 void task_print_list(void) 138 { 139 link_t *cur; 140 task_t *t; 141 ipl_t ipl; 142 int i; 143 144 /* Messing with thread structures, avoid deadlock */ 145 ipl = interrupts_disable(); 146 spinlock_lock(&tasks_lock); 147 148 for (cur=tasks_head.next; cur!=&tasks_head; cur=cur->next) { 149 t = list_get_instance(cur, task_t, tasks_link); 150 spinlock_lock(&t->lock); 151 printf("Task: %Q ActiveCalls: %d", t->taskid, 152 atomic_get(&t->active_calls)); 153 for (i=0; i < IPC_MAX_PHONES; i++) { 154 if (t->phones[i].callee) 155 printf(" Ph(%d): %P ", i,t->phones[i].callee); 156 } 157 printf("\n"); 158 spinlock_unlock(&t->lock); 159 } 160 161 spinlock_unlock(&tasks_lock); 162 interrupts_restore(ipl); 163 164 }
Note:
See TracChangeset
for help on using the changeset viewer.