Changeset 31e8ddd in mainline
- Timestamp:
- 2006-06-05T17:25:37Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2569ec90
- Parents:
- 9c1c677
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/src/proc/task.c
r9c1c677 r31e8ddd 28 28 29 29 #include <proc/task.h> 30 #include <mm/slab.h> 30 31 #include <arch/types.h> 31 32 … … 39 40 bitmap_initialize(&t->arch.iomap, NULL, 0); 40 41 } 42 43 /** Perform amd64 specific task destruction. 44 * 45 * @param t Task to be initialized. 46 */ 47 void task_destroy_arch(task_t *t) 48 { 49 if (t->arch.iomap.map) 50 free(t->arch.iomap.map); 51 } -
arch/ia32/src/proc/task.c
r9c1c677 r31e8ddd 30 30 #include <arch/types.h> 31 31 #include <adt/bitmap.h> 32 #include <mm/slab.h> 32 33 33 34 /** Perform ia32 specific task initialization. … … 40 41 bitmap_initialize(&t->arch.iomap, NULL, 0); 41 42 } 43 44 /** Perform ia32 specific task destruction. 45 * 46 * @param t Task to be initialized. 47 */ 48 void task_destroy_arch(task_t *t) 49 { 50 if (t->arch.iomap.map) 51 free(t->arch.iomap.map); 52 } -
arch/ia64/include/proc/task.h
r9c1c677 r31e8ddd 34 34 35 35 #define task_create_arch(t) 36 #define task_destroy_arch(t) 36 37 37 38 #endif -
arch/mips32/include/proc/task.h
r9c1c677 r31e8ddd 34 34 35 35 #define task_create_arch(t) 36 #define task_destroy_arch(t) 36 37 37 38 #endif -
arch/ppc32/include/proc/task.h
r9c1c677 r31e8ddd 34 34 35 35 #define task_create_arch(t) 36 #define task_destroy_arch(t) 36 37 37 38 #endif -
arch/ppc64/include/proc/task.h
r9c1c677 r31e8ddd 34 34 35 35 #define task_create_arch(t) 36 #define task_destroy_arch(t) 36 37 37 38 #endif -
arch/sparc64/include/proc/task.h
r9c1c677 r31e8ddd 34 34 35 35 #define task_create_arch(t) 36 #define task_destroy_arch(t) 36 37 37 38 #endif -
generic/include/proc/task.h
r9c1c677 r31e8ddd 93 93 #endif 94 94 95 #ifndef task_destroy_arch 96 extern void task_destroy_arch(task_t *t); 97 #endif 98 95 99 extern __native sys_task_get_id(task_id_t *uspace_task_id); 96 100 -
generic/src/mm/as.c
r9c1c677 r31e8ddd 148 148 ipl = interrupts_disable(); 149 149 spinlock_lock(&inactive_as_with_asid_lock); 150 if (as->asid != ASID_INVALID && as->asid != ASID_KERNEL) { 151 list_remove(&as->inactive_as_with_asid_link); 150 151 if (as->asid != ASID_INVALID && as != AS_KERNEL) { 152 if (!as->cpu_refcount) 153 list_remove(&as->inactive_as_with_asid_link); 152 154 asid_put(as->asid); 153 155 } -
generic/src/proc/task.c
r9c1c677 r31e8ddd 141 141 void task_destroy(task_t *t) 142 142 { 143 spinlock_lock(&tasks_lock); 144 btree_remove(&tasks_btree, t->taskid, NULL); 145 spinlock_unlock(&tasks_lock); 146 147 task_destroy_arch(t); 148 btree_destroy(&t->futexes); 149 150 mutex_lock_active(&t->as->lock); 151 if (--t->as->refcount == 0) { 152 mutex_unlock(&t->as->lock); 153 as_destroy(t->as); 154 /* 155 * t->as is destroyed. 156 */ 157 } else { 158 mutex_unlock(&t->as->lock); 159 } 160 161 free(t); 162 TASK = NULL; 143 163 } 144 164 … … 259 279 ta->refcount++; 260 280 spinlock_unlock(&ta->lock); 281 282 spinlock_unlock(&tasks_lock); 261 283 262 284 t = thread_create(ktaskclnp, NULL, ta, 0, "ktaskclnp");
Note:
See TracChangeset
for help on using the changeset viewer.