Changeset 43114c5 in mainline for src/proc/thread.c
- Timestamp:
- 2005-04-09T18:22:53Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8262010
- Parents:
- e6ba9a3f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/proc/thread.c
re6ba9a3f r43114c5 67 67 void cushion(void) 68 68 { 69 void (*f)(void *) = the->thread->thread_code;70 void *arg = the->thread->thread_arg;69 void (*f)(void *) = THREAD->thread_code; 70 void *arg = THREAD->thread_arg; 71 71 72 72 /* this is where each thread wakes up after its creation */ 73 spinlock_unlock(& the->thread->lock);73 spinlock_unlock(&THREAD->lock); 74 74 cpu_priority_low(); 75 75 … … 81 81 void thread_init(void) 82 82 { 83 the->thread= NULL;83 THREAD = NULL; 84 84 nrdy = 0; 85 85 spinlock_initialize(&threads_lock); … … 215 215 restart: 216 216 pri = cpu_priority_high(); 217 spinlock_lock(& the->thread->lock);218 if ( the->thread->timeout_pending) { /* busy waiting for timeouts in progress */219 spinlock_unlock(& the->thread->lock);217 spinlock_lock(&THREAD->lock); 218 if (THREAD->timeout_pending) { /* busy waiting for timeouts in progress */ 219 spinlock_unlock(&THREAD->lock); 220 220 cpu_priority_restore(pri); 221 221 goto restart; 222 222 } 223 the->thread->state = Exiting;224 spinlock_unlock(& the->thread->lock);223 THREAD->state = Exiting; 224 spinlock_unlock(&THREAD->lock); 225 225 scheduler(); 226 226 } … … 248 248 249 249 pri = cpu_priority_high(); 250 spinlock_lock(& the->thread->lock);251 the->thread->call_me = call_me;252 the->thread->call_me_with = call_me_with;253 spinlock_unlock(& the->thread->lock);250 spinlock_lock(&THREAD->lock); 251 THREAD->call_me = call_me; 252 THREAD->call_me_with = call_me_with; 253 spinlock_unlock(&THREAD->lock); 254 254 cpu_priority_restore(pri); 255 255 }
Note:
See TracChangeset
for help on using the changeset viewer.