Changeset 82d515e9 in mainline for kernel/generic/src/proc
- Timestamp:
- 2017-12-05T11:30:02Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9af1c61
- Parents:
- 9a09212
- git-author:
- Jakub Jermar <jakub@…> (2017-12-05 11:25:41)
- git-committer:
- Jakub Jermar <jakub@…> (2017-12-05 11:30:02)
- Location:
- kernel/generic/src/proc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/scheduler.c
r9a09212 r82d515e9 163 163 irq_spinlock_unlock(&CPU->lock, false); 164 164 THREAD->saved_fpu_context = 165 (fpu_context_t *) slab_alloc(fpu_context_ slab, 0);165 (fpu_context_t *) slab_alloc(fpu_context_cache, 0); 166 166 167 167 /* We may have switched CPUs during slab_alloc */ -
kernel/generic/src/proc/task.c
r9a09212 r82d515e9 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 } … … 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 209 task_create_arch(task); 210 210 … … 295 295 as_release(task->as); 296 296 297 slab_free(task_ slab, task);297 slab_free(task_cache, task); 298 298 } 299 299 -
kernel/generic/src/proc/thread.c
r9a09212 r82d515e9 103 103 static thread_id_t last_tid = 0; 104 104 105 static slab_cache_t *thread_ slab;105 static slab_cache_t *thread_cache; 106 106 107 107 #ifdef CONFIG_FPU 108 slab_cache_t *fpu_context_ slab;108 slab_cache_t *fpu_context_cache; 109 109 #endif 110 110 … … 169 169 thread->saved_fpu_context = NULL; 170 170 #else /* CONFIG_FPU_LAZY */ 171 thread->saved_fpu_context = slab_alloc(fpu_context_ slab, kmflags);171 thread->saved_fpu_context = slab_alloc(fpu_context_cache, kmflags); 172 172 if (!thread->saved_fpu_context) 173 173 return -1; … … 199 199 #ifdef CONFIG_FPU 200 200 if (thread->saved_fpu_context) 201 slab_free(fpu_context_ slab, thread->saved_fpu_context);201 slab_free(fpu_context_cache, thread->saved_fpu_context); 202 202 #endif 203 203 return -1; … … 225 225 #ifdef CONFIG_FPU 226 226 if (thread->saved_fpu_context) 227 slab_free(fpu_context_ slab, thread->saved_fpu_context);227 slab_free(fpu_context_cache, thread->saved_fpu_context); 228 228 #endif 229 229 … … 241 241 242 242 atomic_set(&nrdy, 0); 243 thread_ slab= slab_cache_create("thread_t", sizeof(thread_t), 0,243 thread_cache = slab_cache_create("thread_t", sizeof(thread_t), 0, 244 244 thr_constructor, thr_destructor, 0); 245 245 246 246 #ifdef CONFIG_FPU 247 fpu_context_ slab= slab_cache_create("fpu_context_t",247 fpu_context_cache = slab_cache_create("fpu_context_t", 248 248 sizeof(fpu_context_t), FPU_CONTEXT_ALIGN, NULL, NULL, 0); 249 249 #endif … … 341 341 thread_flags_t flags, const char *name) 342 342 { 343 thread_t *thread = (thread_t *) slab_alloc(thread_ slab, 0);343 thread_t *thread = (thread_t *) slab_alloc(thread_cache, 0); 344 344 if (!thread) 345 345 return NULL; … … 457 457 */ 458 458 task_release(thread->task); 459 slab_free(thread_ slab, thread);459 slab_free(thread_cache, thread); 460 460 } 461 461 … … 974 974 * We can safely deallocate it. 975 975 */ 976 slab_free(thread_ slab, thread);976 slab_free(thread_cache, thread); 977 977 free(kernel_uarg); 978 978
Note:
See TracChangeset
for help on using the changeset viewer.