/[rtmk]/rtmk/ipc-syscall.c
ViewVC logotype

Diff of /rtmk/ipc-syscall.c

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

revision 1.11 by jrydberg, Fri Feb 22 22:41:48 2002 UTC revision 1.12 by jrydberg, Wed Mar 6 00:55:01 2002 UTC
# Line 83  rtmk_msg_trap (struct rtmk_msg_header *m Line 83  rtmk_msg_trap (struct rtmk_msg_header *m
83    
84    thread_lock_write (& send_port->lock);    thread_lock_write (& send_port->lock);
85    
86      /* If port belongs to a port set -- use that message queue
87         instead.  For a short time we must hold both locks.  */
88      if (send_port->pset)
89        {
90          struct ipc_port *member = send_port;
91          
92          thread_lock_read (& send_port->pset->lock);
93          send_port = send_port->pset;
94          thread_lock_unlock (&member->lock);
95        }
96    
97    /* If there are a waiting thread we try to pass the message    /* If there are a waiting thread we try to pass the message
98       directly to the thread without blocking.  */       directly to the thread without blocking.  */
99    
# Line 111  rtmk_msg_trap (struct rtmk_msg_header *m Line 122  rtmk_msg_trap (struct rtmk_msg_header *m
122            goto retry_waiting_thread;            goto retry_waiting_thread;
123          }          }
124    
125          assert (ikm);
126        thread->ipc_result = KERN_SUCCESS;        thread->ipc_result = KERN_SUCCESS;
127        thread->ipc_kmsg   = ikm;        thread->ipc_kmsg   = ikm;
128        thread_unlock (thread);        thread_unlock (thread);
# Line 119  rtmk_msg_trap (struct rtmk_msg_header *m Line 131  rtmk_msg_trap (struct rtmk_msg_header *m
131        thread_lock_unlock (& send_port->lock);        thread_lock_unlock (& send_port->lock);
132    
133        /* ??? interrupt thread?  */        /* ??? interrupt thread?  */
134        thread_wakeup ((int) send_port);        thread_interrupt (thread);
135      }      }
136    else    else
137      {      {
# Line 458  internal_msg_trap (struct rtmk_msg_heade Line 470  internal_msg_trap (struct rtmk_msg_heade
470            /* We have to cancel any pending callout.  */            /* We have to cancel any pending callout.  */
471            untimeout (timeout_receive, target);            untimeout (timeout_receive, target);
472    
473              assert (kmsg);
474            target->ipc_result = KERN_SUCCESS;            target->ipc_result = KERN_SUCCESS;
475            target->ipc_kmsg = kmsg;            target->ipc_kmsg = kmsg;
476            target->ipc_blocked_port = 0;            target->ipc_blocked_port = 0;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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