/[hurd]/hurd-l4/deva/device-console.c
ViewVC logotype

Diff of /hurd-l4/deva/device-console.c

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

revision 1.1 by marcus, Tue Feb 1 01:22:38 2005 UTC revision 1.2 by marcus, Thu Feb 3 14:45:42 2005 UTC
# Line 114  console_init (device_t *dev) Line 114  console_init (device_t *dev)
114    error_t err;    error_t err;
115    l4_thread_id_t irq_handler_tid;    l4_thread_id_t irq_handler_tid;
116    pthread_t irq_handler;    pthread_t irq_handler;
117      l4_word_t result;
118    
119    irq_handler_tid = pthread_pool_get_np ();    irq_handler_tid = pthread_pool_get_np ();
120    if (irq_handler_tid == l4_nilthread)    if (irq_handler_tid == l4_nilthread)
121      panic ("Can not create the irq handler thread");      panic ("Can not create the kbd irq handler thread");
122      
123      /* FIXME: We just tweak the scheduler so we can set the priority
124         ourselves.  */
125      result =  wortel_thread_control (irq_handler_tid, irq_handler_tid,
126                                       l4_myself (), l4_nilthread, (void *) -1);
127      if (result)
128        panic ("Can not set scheduler for kbd irq handler thread: %i", result);
129      result = l4_set_priority (irq_handler_tid, /* FIXME */ 150);
130      if (!result)
131        panic ("Can not set priority for kbd irq handler thread: %i", result);
132    
133    err = pthread_create_from_l4_tid_np (&irq_handler, NULL,    err = pthread_create_from_l4_tid_np (&irq_handler, NULL,
134                                         irq_handler_tid, console_irq_handler,                                         irq_handler_tid, console_irq_handler,
135                                         dev);                                         dev);
136    if (err)    if (err)
137      panic ("Can not create the irq handler thread: %i", err);      panic ("Can not create the kbd irq handler thread: %i", err);
138    
139    pthread_detach (irq_handler);    pthread_detach (irq_handler);
140  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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