Changes in kernel/generic/src/proc/scheduler.c [ba9a150:a6e55886] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/scheduler.c
rba9a150 ra6e55886 54 54 #include <atomic.h> 55 55 #include <synch/spinlock.h> 56 #include <synch/workqueue.h> 57 #include <synch/rcu.h> 56 58 #include <config.h> 57 59 #include <context.h> … … 88 90 { 89 91 before_thread_runs_arch(); 92 rcu_before_thread_runs(); 90 93 91 94 #ifdef CONFIG_FPU_LAZY … … 128 131 static void after_thread_ran(void) 129 132 { 133 workq_after_thread_ran(); 134 rcu_after_thread_ran(); 130 135 after_thread_ran_arch(); 131 136 } … … 134 139 void scheduler_fpu_lazy_request(void) 135 140 { 141 restart: 136 142 fpu_enable(); 137 143 irq_spinlock_lock(&CPU->lock, false); … … 152 158 fpu_context_restore(THREAD->saved_fpu_context); 153 159 } else { 160 /* Allocate FPU context */ 161 if (!THREAD->saved_fpu_context) { 162 /* Might sleep */ 163 irq_spinlock_unlock(&THREAD->lock, false); 164 irq_spinlock_unlock(&CPU->lock, false); 165 THREAD->saved_fpu_context = 166 (fpu_context_t *) slab_alloc(fpu_context_cache, 0); 167 168 /* We may have switched CPUs during slab_alloc */ 169 goto restart; 170 } 154 171 fpu_init(); 155 172 THREAD->fpu_context_exists = true; … … 413 430 414 431 case Exiting: 432 rcu_thread_exiting(); 415 433 repeat: 416 434 if (THREAD->detached) {
Note:
See TracChangeset
for help on using the changeset viewer.