diff --git a/src/sys/include/mpi/mpi.h b/src/sys/include/mpi/mpi.h index e25922e..27b0d51 100644 --- a/src/sys/include/mpi/mpi.h +++ b/src/sys/include/mpi/mpi.h @@ -51,6 +51,7 @@ int mpiCreateMbox(char *); +int mpiDestroyMbox(char *); int mpiPostMessage(char *,uInt32,void *); int mpiFetchMessage(char *,mpiMessage_t *); int mpiSpam(uInt32,void *); @@ -59,6 +60,9 @@ /*** $Log$ + Revision 1.3 2004/05/25 16:28:21 reddawg + Made mpiFindMbox() static + Revision 1.2 2004/05/25 15:42:19 reddawg Enabled mpiSpam(); diff --git a/src/sys/mpi/message.c b/src/sys/mpi/message.c index ec58c28..c26739b 100644 --- a/src/sys/mpi/message.c +++ b/src/sys/mpi/message.c @@ -211,8 +211,39 @@ return(0x0); } +/***************************************************************************************** + + Function: int mpiDestroyMbox(char *name) + + Description: This function will fetch the next message out of the specified mailbox + + Notes: + +*****************************************************************************************/ +int mpiDestroyMbox(char *name,mpiMessage_t *msg) { + mpiMbox_t *mbox = 0x0; + mpiMessage_t *tmpMsg = 0x0; + + spinLock(&mpiSpinLock); + + for (mbox = mboxList;mbox;mbox=mbox->next) { + if (!kstrcmp(mbox->name,name)) { + mbox->prev->next = mbox->next; + mbox->next->prev = mbox->prev; + kfree(mbox); + return(0x0); + } + } + + spinUnlock(&mpiSpinLock); + return(-1); + } + /*** $Log$ + Revision 1.3 2004/05/25 16:33:26 reddawg + Added some basic documentation + Revision 1.2 2004/05/25 15:42:18 reddawg Enabled mpiSpam();