Changes in kernel/generic/src/proc/thread.c [e7c4115d:82d515e9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
re7c4115d 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.