/[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.6 by jrydberg, Tue Jan 29 18:31:45 2002 UTC revision 1.7 by jrydberg, Tue Feb 5 20:45:32 2002 UTC
# Line 1  Line 1 
1  /* IPC related system calls.  /* IPC related system calls.
2     Copyright 1999, 2000, 2001 Johan Rydberg, jrydberg@opencores.org.     Copyright 1999, 2000, 2001, 2002 Johan Rydberg, jrydberg@opencores.org.
3    
4  This program is free software; you can redistribute it and/or modify  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by  it under the terms of the GNU General Public License as published by
# Line 332  internal_msg_trap (struct rtmk_msg_heade Line 332  internal_msg_trap (struct rtmk_msg_heade
332    
333        else if (ipc_tqueue_empty (&port->waiting_threads) == false)        else if (ipc_tqueue_empty (&port->waiting_threads) == false)
334          {          {
335            bool succeeded;            bool failed;
336            SPL_T spl;            SPL_T spl;
337    
338            /* We have to update the lock from read to write.  */            /* We have to update the lock from read to write.  */
339    
340            succeeded = thread_lock_read_to_write (&port->lock);            failed = thread_lock_read_to_write (&port->lock);
341            assert (succeeded);            assert (failed == false);
342    
343            /* Remove thread from wait queue. */            /* Remove thread from wait queue. */
344    
# Line 380  internal_msg_trap (struct rtmk_msg_heade Line 380  internal_msg_trap (struct rtmk_msg_heade
380    
381        else        else
382          {          {
383            bool succeeded, result;            bool failed, result;
384    
385            /* We have to update the lock from read to write.  */            /* We have to update the lock from read to write.  */
386    
387            succeeded = thread_lock_read_to_write (&port->lock);            failed = thread_lock_read_to_write (&port->lock);
388            assert (succeeded);            assert (failed == false);
389    
390          enqueue_message_on_port:          enqueue_message_on_port:
391    
# Line 443  internal_msg_trap (struct rtmk_msg_heade Line 443  internal_msg_trap (struct rtmk_msg_heade
443    
444            /* Upgrade to write lock for port.  */            /* Upgrade to write lock for port.  */
445    
446            while (! thread_lock_read_to_write (&port->lock))            while (thread_lock_read_to_write (&port->lock))
447              assert (0); /* ??? block?  */              assert (0); /* ??? block?  */
448    
449            /* Remove message from port message queue and copy message into            /* Remove message from port message queue and copy message into

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

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