Changes in kernel/generic/src/proc/thread.c [26aafe8:c0699467] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r26aafe8 rc0699467 39 39 #include <proc/thread.h> 40 40 #include <proc/task.h> 41 #include <proc/uarg.h>42 41 #include <mm/frame.h> 43 42 #include <mm/page.h> … … 45 44 #include <arch/cycle.h> 46 45 #include <arch.h> 47 #include <synch/synch.h>48 46 #include <synch/spinlock.h> 49 47 #include <synch/waitq.h> … … 55 53 #include <time/clock.h> 56 54 #include <time/timeout.h> 55 #include <time/delay.h> 57 56 #include <config.h> 58 57 #include <arch/interrupt.h> … … 259 258 */ 260 259 261 list_append(&thread->rq_link, &cpu->rq[i].rq _head);260 list_append(&thread->rq_link, &cpu->rq[i].rq); 262 261 cpu->rq[i].n++; 263 262 irq_spinlock_unlock(&(cpu->rq[i].lock), true); … … 321 320 thread->cpu = NULL; 322 321 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 _head);423 list_append(&thread->th_link, &task->threads); 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--; 483 500 } 484 501 … … 912 929 } 913 930 931 sysarg_t sys_thread_udelay(uint32_t usec) 932 { 933 delay(usec); 934 return 0; 935 } 936 914 937 /** @} 915 938 */
Note:
See TracChangeset
for help on using the changeset viewer.