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

Diff of /rtmk/timer.c

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

revision 1.5 by jrydberg, Mon Jan 7 20:50:12 2002 UTC revision 1.6 by jrydberg, Fri Jan 11 22:24:11 2002 UTC
# Line 88  callout_continuation (void) Line 88  callout_continuation (void)
88    
89    spin_unlock (&callout_list_lock);    spin_unlock (&callout_list_lock);
90    SPLON (spl);    SPLON (spl);
91    thread_sleep ((int) &callout_list, &callout_list_lock,    thread_sleep ((int) &callout_list, 0, callout_continuation);
                 callout_continuation);  
92    /* NOTREACHED */    /* NOTREACHED */
93  }  }
94    
# Line 150  callout_init (void) Line 149  callout_init (void)
149    err = thread_create (TASK_KERNEL (), &callout_thread);    err = thread_create (TASK_KERNEL (), &callout_thread);
150    assert (err == KERN_SUCCESS);    assert (err == KERN_SUCCESS);
151    
 #if 1  
152    thread_set_priority (callout_thread, THREAD_POLICY_FIFO, 0);    thread_set_priority (callout_thread, THREAD_POLICY_FIFO, 0);
 #endif  
153    thread_start (callout_thread, callout_thread_fn, 0);    thread_start (callout_thread, callout_thread_fn, 0);
154    thread_setrun (callout_thread, false);    thread_setrun (callout_thread, false);
155  }  }
# Line 186  void Line 183  void
183  timer_interrupt (bool usermode_p)  timer_interrupt (bool usermode_p)
184  {  {
185    struct thread *thread = THREAD_CURRENT ();    struct thread *thread = THREAD_CURRENT ();
186      struct callout_entry *entry;  
187    bool preempt_p;    bool preempt_p;
188    
189  #define CLOCK_RESOLUTION  (1000000000 / HZ)  #define CLOCK_RESOLUTION  (1000000000 / HZ)
# Line 205  timer_interrupt (bool usermode_p) Line 203  timer_interrupt (bool usermode_p)
203                
204        if (! queue_empty (&callout_list))        if (! queue_empty (&callout_list))
205          {          {
           struct callout_entry *entry;  
             
206            entry = (struct callout_entry *) queue_first (&callout_list);            entry = (struct callout_entry *) queue_first (&callout_list);
207                        
208            if (timestamp_count >= entry->timestamp)            if (timestamp_count >= entry->timestamp)

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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