Rev 210 | Rev 227 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 210 | Rev 213 | ||
---|---|---|---|
Line 73... | Line 73... | ||
73 | void cushion(void) |
73 | void cushion(void) |
74 | { |
74 | { |
75 | void (*f)(void *) = THREAD->thread_code; |
75 | void (*f)(void *) = THREAD->thread_code; |
76 | void *arg = THREAD->thread_arg; |
76 | void *arg = THREAD->thread_arg; |
77 | 77 | ||
- | 78 | /* this is where each thread wakes up after its creation */ |
|
78 | before_thread_runs(); |
79 | before_thread_runs(); |
79 | 80 | ||
80 | /* this is where each thread wakes up after its creation */ |
- | |
81 | spinlock_unlock(&THREAD->lock); |
81 | spinlock_unlock(&THREAD->lock); |
82 | cpu_priority_low(); |
82 | cpu_priority_low(); |
83 | 83 | ||
84 | f(arg); |
84 | f(arg); |
85 | thread_exit(); |
85 | thread_exit(); |