Changeset ff14c520 in mainline for generic/src/proc/task.c
- Timestamp:
- 2006-03-16T22:31:39Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93165be
- Parents:
- 37c57f2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/proc/task.c
r37c57f2 rff14c520 63 63 * 64 64 * @param as Task's address space. 65 * @param name Symbolic name. 65 66 * 66 67 * @return New task's structure 67 68 * 68 69 */ 69 task_t *task_create(as_t *as )70 task_t *task_create(as_t *as, char *name) 70 71 { 71 72 ipl_t ipl; … … 79 80 list_initialize(&ta->tasks_link); 80 81 ta->as = as; 82 ta->name = name; 81 83 82 84 … … 102 104 /** Create new task with 1 thread and run it 103 105 * 106 * @param programe_addr Address of program executable image. 107 * @param name Program name. 108 * 104 109 * @return Task of the running program or NULL on error 105 110 */ 106 task_t * task_run_program(void *program_addr )111 task_t * task_run_program(void *program_addr, char *name) 107 112 { 108 113 as_t *as; … … 120 125 } 121 126 122 task = task_create(as );127 task = task_create(as, name); 123 128 t = thread_create(uinit, (void *)((elf_header_t *)program_addr)->e_entry, 124 task, THREAD_USER_STACK);129 task, 0, "uinit"); 125 130 126 131 /* … … 149 154 t = list_get_instance(cur, task_t, tasks_link); 150 155 spinlock_lock(&t->lock); 151 printf(" Task: %Q ActiveCalls: %d", t->taskid,152 156 printf("%s: address=%P, taskid=%Q, as=%P, ActiveCalls: %d", 157 t->name, t, t->taskid, t->as, atomic_get(&t->active_calls)); 153 158 for (i=0; i < IPC_MAX_PHONES; i++) { 154 159 if (t->phones[i].callee)
Note:
See TracChangeset
for help on using the changeset viewer.