Revision: 249 Author: nieklinnenbank Date: Sun Aug 2 03:48:33 2009 Log: Modified IPCMessage to prepend messages per default. Additionally, SendReceive now unconditionally sleeps until another processes does a Send. http://code.google.com/p/freenos/source/detail?r=249 Modified: /trunk/kernel/API/IPCMessage.cpp ======================================= --- /trunk/kernel/API/IPCMessage.cpp Sat Jun 6 06:01:22 2009 +++ /trunk/kernel/API/IPCMessage.cpp Sun Aug 2 03:48:33 2009 @@ -49,12 +49,16 @@ return ESRCH; } /* Put our message on their list, and try to let them execute! */ - proc->getMessages()->insertTail(new UserMessage(msg, size)); - scheduler->executeAttempt(proc); - + proc->getMessages()->insertHead(new UserMessage(msg, size)); + + if (action == SendReceive) + scheduler->current()->setState(Sleeping); + + scheduler->executeAttempt(proc); + if (action == Send) break; - + case Receive: /* Block until we have a message. */