Changeset 49115ac in mainline
- Timestamp:
- 2017-08-19T11:03:47Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e7ac23d0
- Parents:
- e7c4115d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/task.c
re7c4115d r49115ac 84 84 static void task_kill_internal(task_t *); 85 85 static int tsk_constructor(void *, unsigned int); 86 static size_t tsk_destructor(void *obj); 86 87 87 88 /** Initialize kernel tasks support. … … 93 94 avltree_create(&tasks_tree); 94 95 task_slab = slab_cache_create("task_t", sizeof(task_t), 0, 95 tsk_constructor, NULL, 0);96 tsk_constructor, tsk_destructor, 0); 96 97 } 97 98 … … 167 168 168 169 list_initialize(&task->threads); 169 170 170 171 task->kobject = malloc(sizeof(kobject_t) * MAX_KERNEL_OBJECTS, 0); 171 172 … … 182 183 #endif 183 184 185 return 0; 186 } 187 188 size_t tsk_destructor(void *obj) 189 { 190 task_t *task = (task_t *) obj; 191 192 free(task->kobject); 184 193 return 0; 185 194 } … … 285 294 as_release(task->as); 286 295 287 free(task->kobject);288 289 296 slab_free(task_slab, task); 290 297 }
Note:
See TracChangeset
for help on using the changeset viewer.