Changeset b0f00a9 in mainline for kernel/generic/src/proc/thread.c
- Timestamp:
- 2011-11-06T22:21:05Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 898e847
- Parents:
- 2bdf8313 (diff), 7b5f4c9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
kernel/generic/src/proc/thread.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r2bdf8313 rb0f00a9 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.
