/[hurd]/hurd-l4/libhurd-cap-server/bucket-manage-mt.c
ViewVC logotype

Diff of /hurd-l4/libhurd-cap-server/bucket-manage-mt.c

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

revision 1.7 by marcus, Tue Oct 19 19:41:03 2004 UTC revision 1.8 by marcus, Sat Oct 23 01:07:01 2004 UTC
# Line 29  Line 29 
29  #include <stdint.h>  #include <stdint.h>
30  #include <pthread.h>  #include <pthread.h>
31    
32    #include <l4.h>
33    
34  #include "cap-server-intern.h"  #include "cap-server-intern.h"
35    
36    
37    /* When using propagation, the from thread ID returned can differ from
38       the one we used for the closed receive.  */
39    #define l4_xreceive_timeout(from,timeout,fromp) \
40      (l4_ipc (l4_nilthread, from, timeout,fromp))
41    #define l4_xreceive(from,fromp) \
42      l4_xreceive_timeout (from, l4_timeouts (L4_ZERO_TIME, L4_NEVER), fromp)
43    
44    
45  /* FIXME: Throughout this file, for debugging the behaviour could be  /* FIXME: Throughout this file, for debugging the behaviour could be
46     relaxed to return errors to callers which would otherwise be     relaxed to return errors to callers which would otherwise be
47     ignored (due to malformed requests etc).  */     ignored (due to malformed requests etc).  */
# Line 357  manage_mt_worker (void *arg) Line 367  manage_mt_worker (void *arg)
367    /* When we are started up, we are supposed to listen as soon as    /* When we are started up, we are supposed to listen as soon as
368       possible to the next incoming message.  The first time, we do       possible to the next incoming message.  The first time, we do
369       this without a timeout.  */       this without a timeout.  */
370    from = manager;    msg_tag = l4_xreceive (manager, &from);
   msg_tag = l4_wait (&from);  
371    
372    while (1)    while (1)
373      {      {
# Line 390  manage_mt_worker (void *arg) Line 399  manage_mt_worker (void *arg)
399    
400            /* If we are the current worker, we should wait here for the            /* If we are the current worker, we should wait here for the
401               next message without a timeout.  */               next message without a timeout.  */
402            from = manager;            msg_tag = l4_xreceive (manager, &from);
           msg_tag = l4_wait (&from);  
403            /* From here, we will loop all over to the beginning of the            /* From here, we will loop all over to the beginning of the
404               while(1) block.  */               while(1) block.  */
405          }          }
# Line 628  manage_mt_worker (void *arg) Line 636  manage_mt_worker (void *arg)
636                                
637                /* Now listen for the next message, with a timeout.  */                /* Now listen for the next message, with a timeout.  */
638                from = manager;                from = manager;
639                msg_tag = l4_wait_timeout (timeout, &from);                msg_tag = l4_xreceive_timeout (manager, timeout, &from);
640    
641                /* From here, we will loop all over to the beginning of                /* From here, we will loop all over to the beginning of
642                   the while(1) block.  */                   the while(1) block.  */
# Line 688  manage_mt_get_next_worker (struct worker Line 696  manage_mt_get_next_worker (struct worker
696        else        else
697          err = pthread_create_from_l4_tid_np (worker_thread, NULL,          err = pthread_create_from_l4_tid_np (worker_thread, NULL,
698                                               worker, manage_mt_worker, info);                                               worker, manage_mt_worker, info);
699          
700        if (!err)        if (!err)
701          {          {
702            pthread_detach (*worker_thread);            pthread_detach (*worker_thread);

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

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