Changes in kernel/generic/src/proc/task.c [c46bfbc:7f11dc6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/task.c
rc46bfbc r7f11dc6 79 79 static task_id_t task_counter = 0; 80 80 81 static slab_cache_t *task_ slab;81 static slab_cache_t *task_cache; 82 82 83 83 /* Forward declarations. */ … … 93 93 TASK = NULL; 94 94 avltree_create(&tasks_tree); 95 task_ slab= slab_cache_create("task_t", sizeof(task_t), 0,95 task_cache = slab_cache_create("task_t", sizeof(task_t), 0, 96 96 tsk_constructor, tsk_destructor, 0); 97 97 } … … 185 185 #endif 186 186 187 return 0;187 return EOK; 188 188 } 189 189 … … 206 206 task_t *task_create(as_t *as, const char *name) 207 207 { 208 task_t *task = (task_t *) slab_alloc(task_slab, 0); 208 task_t *task = (task_t *) slab_alloc(task_cache, 0); 209 if (task == NULL) { 210 return NULL; 211 } 212 209 213 task_create_arch(task); 210 214 … … 241 245 if ((ipc_phone_0) && 242 246 (container_check(ipc_phone_0->task->container, task->container))) { 243 cap_handle_t phone_handle = phone_alloc(task); 247 cap_handle_t phone_handle; 248 int rc = phone_alloc(task, &phone_handle); 249 if (rc != EOK) { 250 task->as = NULL; 251 task_destroy_arch(task); 252 slab_free(task_cache, task); 253 return NULL; 254 } 255 244 256 kobject_t *phone_obj = kobject_get(task, phone_handle, 245 257 KOBJECT_TYPE_PHONE); … … 295 307 as_release(task->as); 296 308 297 slab_free(task_ slab, task);309 slab_free(task_cache, task); 298 310 } 299 311
Note:
See TracChangeset
for help on using the changeset viewer.