UbixOS V2  2.0
mpi_syscalls.c
Go to the documentation of this file.
1 #include <mpi/mpi.h>
2 #include <sys/sysproto.h>
3 
4 int sys_mpiCreateMbox(struct thread *td, struct sys_mpiCreateMbox_args *args) {
5  td->td_retval[0] = mpi_createMbox(args->name);
6  return (0x0);
7 }
8 
9 int sys_mpiDestroyMbox(struct thread *td, struct sys_mpiDestroyMbox_args *args) {
10  td->td_retval[0] = mpi_destroyMbox(args->name);
11  return (0x0);
12 }
13 
14 int sys_mpiFetchMessage(struct thread *td, struct sys_mpiFetchMessage_args *args) {
15  td->td_retval[0] = mpi_fetchMessage(args->name, (mpi_message_t *)args->msg);
16  return (0x0);
17 }
18 
19 int sys_mpiPostMessage(struct thread *td, struct sys_mpiPostMessage_args *args) {
20  kprintf("mPM: %s", args->name);
21  td->td_retval[0] = mpi_postMessage(args->name, args->type, (mpi_message_t *)args->msg);
22  return (0x0);
23 }
mpi_fetchMessage
int mpi_fetchMessage(char *, mpi_message_t *)
Definition: system.c:187
mpi_postMessage
int mpi_postMessage(char *, uInt32, mpi_message_t *)
sysproto.h
sys_mpiCreateMbox_args::name
char * name
Definition: sysproto.h:49
sys_mpiPostMessage_args::type
uint32_t type
Definition: sysproto.h:73
thread
Definition: thread.h:40
sys_mpiFetchMessage_args::name
char * name
Definition: sysproto.h:61
sys_mpiPostMessage_args::name
char * name
Definition: sysproto.h:70
sys_mpiCreateMbox_args
Definition: sysproto.h:47
thread::td_retval
int td_retval[2]
Definition: thread.h:41
mpi.h
sys_mpiDestroyMbox
int sys_mpiDestroyMbox(struct thread *td, struct sys_mpiDestroyMbox_args *args)
Definition: mpi_syscalls.c:9
sys_mpiDestroyMbox_args::name
char * name
Definition: sysproto.h:55
mpi_destroyMbox
int mpi_destroyMbox(char *)
Definition: system.c:231
sys_mpiDestroyMbox_args
Definition: sysproto.h:53
sys_mpiPostMessage_args::msg
const void * msg
Definition: sysproto.h:76
sys_mpiPostMessage
int sys_mpiPostMessage(struct thread *td, struct sys_mpiPostMessage_args *args)
Definition: mpi_syscalls.c:19
sys_mpiPostMessage_args
Definition: sysproto.h:68
sys_mpiCreateMbox
int sys_mpiCreateMbox(struct thread *td, struct sys_mpiCreateMbox_args *args)
Definition: mpi_syscalls.c:4
mpi_message
Definition: mpi.h:37
kprintf
int kprintf(const char *,...)
Definition: kprintf.c:259
sys_mpiFetchMessage
int sys_mpiFetchMessage(struct thread *td, struct sys_mpiFetchMessage_args *args)
Definition: mpi_syscalls.c:14
sys_mpiFetchMessage_args::msg
const void * msg
Definition: sysproto.h:64
mpi_createMbox
int mpi_createMbox(char *)
Definition: system.c:68
sys_mpiFetchMessage_args
Definition: sysproto.h:59