system.c File Reference

#include <mpi/mpi.h>
#include <lib/kmalloc.h>
#include <lib/string.h>
#include <ubixos/spinlock.h>

Go to the source code of this file.

Functions

int mpi_createMbox (char *name)
int mpi_destroyMbox (char *name)
int mpi_fetchMessage (char *name, mpi_message_t *msg)
static mpi_mbox_tmpi_findMbox (char *name)
int mpi_postMessage (char *name, uInt32 type, mpi_message_t *msg)
int mpi_spam (uInt32 type, void *data)

Variables

static mpi_mbox_tmboxList = 0x0
static spinLock_t mpiSpinLock = SPIN_LOCK_INITIALIZER


Function Documentation

int mpi_createMbox ( char *  name  ) 

Definition at line 69 of file system.c.

References _current, taskStruct::id, kmalloc(), mbox, mboxList, mpi_findMbox(), mpiSpinLock, mpi_mbox::prev, spinLock(), spinUnlock(), and sprintf().

Referenced by sysMpiCreateMbox(), systemTask(), and ubixfs_thread().

int mpi_destroyMbox ( char *  name  ) 

Definition at line 234 of file system.c.

References _current, taskStruct::id, kfree(), mbox, mboxList, mpiSpinLock, spinLock(), spinUnlock(), and strcmp().

Referenced by sysMpiDestroyMbox().

int mpi_fetchMessage ( char *  name,
mpi_message_t msg 
)

Definition at line 189 of file system.c.

References _current, mpi_message::data, mpi_message::header, taskStruct::id, kfree(), mbox, memcpy(), MESSAGE_LENGTH, mpi_findMbox(), mpiSpinLock, mpi_message::pid, spinLock(), and spinUnlock().

Referenced by sysMpiFetchMessage(), systemTask(), and ubixfs_thread().

static mpi_mbox_t* mpi_findMbox ( char *  name  )  [static]

Definition at line 47 of file system.c.

References mbox, mboxList, and strcmp().

Referenced by mpi_createMbox(), mpi_fetchMessage(), and mpi_postMessage().

int mpi_postMessage ( char *  name,
uInt32  type,
mpi_message_t msg 
)

Definition at line 143 of file system.c.

References _current, mpi_message::data, mpi_message::header, taskStruct::id, kmalloc(), mbox, memcpy(), MESSAGE_LENGTH, mpi_findMbox(), mpiSpinLock, mpi_message::next, mpi_message::pid, spinLock(), spinUnlock(), and x1.

Referenced by sysMpiPostMessage().

int mpi_spam ( uInt32  type,
void *  data 
)

Definition at line 108 of file system.c.

References mpi_message::data, mpi_message::header, kmalloc(), mbox, mboxList, memcpy(), MESSAGE_LENGTH, mpiSpinLock, mpi_message::next, spinLock(), and spinUnlock().

Referenced by sysMpiSpam().


Variable Documentation

mpi_mbox_t* mboxList = 0x0 [static]

Definition at line 35 of file system.c.

Referenced by mpi_createMbox(), mpi_destroyMbox(), mpi_findMbox(), and mpi_spam().

spinLock_t mpiSpinLock = SPIN_LOCK_INITIALIZER [static]

Definition at line 36 of file system.c.

Referenced by mpi_createMbox(), mpi_destroyMbox(), mpi_fetchMessage(), mpi_postMessage(), and mpi_spam().


Generated on Tue Dec 12 08:52:15 2006 for UbixOS V2 by  doxygen 1.4.7