/[rtmk]/rtmk/thread.c
ViewVC logotype

Diff of /rtmk/thread.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by jrydberg, Thu Jan 3 01:46:01 2002 UTC revision 1.9 by jrydberg, Thu Jan 3 21:38:14 2002 UTC
# Line 119  thread_create (struct task *task, struct Line 119  thread_create (struct task *task, struct
119    
120    thread->ref_cnt = 1;    thread->ref_cnt = 1;
121    thread->suspend_cnt = 1;    thread->suspend_cnt = 1;
122      thread->swap_fn = thread_bootstrap_return;
123    
124    thread->sched_priority = 6;    thread->sched_priority = 6;
125    thread->sched_policy = THREAD_POLICY_TIMESHARE;    thread->sched_policy = THREAD_POLICY_TIMESHARE;
126    thread->sched_state = THREAD_STATE_SUSPEND;    thread->sched_state = THREAD_STATE_SUSPEND | THREAD_STATE_SWAPPED;
127    thread->sched_sp       = & sched_policies [THREAD_POLICY_TIMESHARE];    thread->sched_sp = & sched_policies [THREAD_POLICY_TIMESHARE];
128    
129    CALC_PREMUL (thread);    CALC_PREMUL (thread);
130    
# Line 648  thread_start (struct thread *thread, voi Line 649  thread_start (struct thread *thread, voi
649    
650    stack_alloc (thread, (void (*)()) thread_continue);    stack_alloc (thread, (void (*)()) thread_continue);
651    
652    thread->sched_state &= ~THREAD_STATE_SUSPEND;    thread->sched_state &= ~(THREAD_STATE_SUSPEND | THREAD_STATE_SWAPPED);
653    thread->sched_state |=  THREAD_STATE_RUN;    thread->sched_state |=  THREAD_STATE_RUN;
654    thread->suspend_cnt = 0;    thread->suspend_cnt = 0;
655  }  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26