Changes in kernel/generic/src/proc/thread.c [c0699467:26aafe8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
rc0699467 r26aafe8 39 39 #include <proc/thread.h> 40 40 #include <proc/task.h> 41 #include <proc/uarg.h> 41 42 #include <mm/frame.h> 42 43 #include <mm/page.h> … … 44 45 #include <arch/cycle.h> 45 46 #include <arch.h> 47 #include <synch/synch.h> 46 48 #include <synch/spinlock.h> 47 49 #include <synch/waitq.h> … … 53 55 #include <time/clock.h> 54 56 #include <time/timeout.h> 55 #include <time/delay.h>56 57 #include <config.h> 57 58 #include <arch/interrupt.h> … … 258 259 */ 259 260 260 list_append(&thread->rq_link, &cpu->rq[i].rq );261 list_append(&thread->rq_link, &cpu->rq[i].rq_head); 261 262 cpu->rq[i].n++; 262 263 irq_spinlock_unlock(&(cpu->rq[i].lock), true); … … 320 321 thread->cpu = NULL; 321 322 thread->flags = flags; 322 thread->nomigrate = 0;323 323 thread->state = Entering; 324 324 … … 421 421 atomic_inc(&task->lifecount); 422 422 423 list_append(&thread->th_link, &task->th reads);423 list_append(&thread->th_link, &task->th_head); 424 424 425 425 irq_spinlock_pass(&task->lock, &threads_lock); … … 481 481 /* Not reached */ 482 482 while (true); 483 }484 485 /** Prevent the current thread from being migrated to another processor. */486 void thread_migration_disable(void)487 {488 ASSERT(THREAD);489 490 THREAD->nomigrate++;491 }492 493 /** Allow the current thread to be migrated to another processor. */494 void thread_migration_enable(void)495 {496 ASSERT(THREAD);497 ASSERT(THREAD->nomigrate > 0);498 499 THREAD->nomigrate--;500 483 } 501 484 … … 929 912 } 930 913 931 sysarg_t sys_thread_udelay(uint32_t usec)932 {933 delay(usec);934 return 0;935 }936 937 914 /** @} 938 915 */
Note:
See TracChangeset
for help on using the changeset viewer.