diff --git a/src/include/sys/mpi.h b/src/include/sys/mpi.h index 2467c72..8d287ae 100644 --- a/src/include/sys/mpi.h +++ b/src/include/sys/mpi.h @@ -44,6 +44,7 @@ int mpiCreateMbox(char *); +int mpiDestroyMbox(char *); int mpiPostMessage(char *,uInt32,void *); int mpiFetchMessage(char *,mpiMessage_t *); int mpiSpam(uInt32 type,void *); @@ -52,6 +53,9 @@ /*** $Log$ + Revision 1.2 2004/05/25 18:48:48 reddawg + Userland now uses MESSAGE_LENGTH + Revision 1.1 2004/05/25 15:43:27 reddawg Added Userland MPI access diff --git a/src/lib/libc_old/sys/mpi.c b/src/lib/libc_old/sys/mpi.c index 9065e0c..8c785b0 100644 --- a/src/lib/libc_old/sys/mpi.c +++ b/src/lib/libc_old/sys/mpi.c @@ -39,10 +39,20 @@ return(status); } +int mpiDestroyMbox(char *name) { + int status = 0x0; + asm( + "int %0\n" + : : "i" (0x80),"a" (51),"b" (&status),"c" (name) + ); + + return(status); + } + int mpiPostMessage(char *name,uInt32 type,void *data) { asm( "int %0\n" - : : "i" (0x80),"a" (51),"b" (name),"c" (&type),"d" (data) + : : "i" (0x80),"a" (52),"b" (name),"c" (&type),"d" (data) ); return(type); } @@ -51,7 +61,7 @@ int status = 0x0; asm( "int %0\n" - : : "i" (0x80),"a" (52),"b" (name),"c" (msg),"d" (&status) + : : "i" (0x80),"a" (53),"b" (name),"c" (msg),"d" (&status) ); return(status); } @@ -60,13 +70,16 @@ int status = 0x0; asm( "int %0\n" - : : "i" (0x80),"a" (53),"b" (type),"c" (data),"d" (&status) + : : "i" (0x80),"a" (54),"b" (type),"c" (data),"d" (&status) ); return(status); } /*** $Log$ + Revision 1.1 2004/05/25 15:43:27 reddawg + Added Userland MPI access + END ***/ diff --git a/src/sys/include/ubixos/syscalls.h b/src/sys/include/ubixos/syscalls.h index d2f92f5..a9075dd 100644 --- a/src/sys/include/ubixos/syscalls.h +++ b/src/sys/include/ubixos/syscalls.h @@ -62,6 +62,7 @@ void sysStartSDE(); void sysUnlink(); void sysMpiCreateMbox(); +void sysMpiDestroyMbox(); void sysMpiPostMessage(); void sysMpiFetchMessage(); void sysMpiSpam(); @@ -119,10 +120,11 @@ sysGetTime, /** 47 Get Time **/ sysStartSDE, /** 48 start SDE **/ invalidCall, /** 49 **/ - sysMpiCreateMbox, /** 50 mpiCreateMbox **/ - sysMpiPostMessage, /** 51 mpiPostMessage **/ - sysMpiFetchMessage, /** 52 mpiFetchMessage **/ - sysMpiSpam, /** 53 mpiSpam **/ + sysMpiCreateMbox, /** 50 mpiCreateMbox **/ + sysMpiDestroyMbox, /** 51 mpiDestroyMbox **/ + sysMpiPostMessage, /** 52 mpiPostMessage **/ + sysMpiFetchMessage, /** 53 mpiFetchMessage **/ + sysMpiSpam, /** 54 mpiSpam **/ }; int totalCalls = sizeof(systemCalls)/sizeof(functionPTR); @@ -131,6 +133,9 @@ /*** $Log$ + Revision 1.3 2004/05/25 15:42:19 reddawg + Enabled mpiSpam(); + Revision 1.2 2004/05/21 15:20:00 reddawg Cleaned up diff --git a/src/sys/kernel/syscall.c b/src/sys/kernel/syscall.c index f1c2b14..6f9cb75 100644 --- a/src/sys/kernel/syscall.c +++ b/src/sys/kernel/syscall.c @@ -172,6 +172,11 @@ return; } +void sysMpiDestroyMbox(uInt32 *status,char *name) { + *status = mpiDestroyMbox(name); + return; + } + void sysMpiPostMessage(char *name,uInt32 *type,void *data) { *type = mpiPostMessage(name,*type,data); return; @@ -189,6 +194,9 @@ /*** $Log$ + Revision 1.12 2004/05/26 13:07:54 reddawg + mpi: had problem with mpiCreateMbox interface was putting garbage on end + Revision 1.11 2004/05/25 15:49:03 reddawg Added Syscall Interface For MPI