Go to index, previous page, next page

syscall.cc

This module contains the routines needed to handle the system MsgRecv() and MsgSend() functions.

This module exports:

void HandleMsgSend( Thread *, int ) explained below
int HandleMsgRecv( Thread *, Message * ) explained below
void DeliverMsg( Thread *src, Thread *dest, int payload ) explained below


Look at the header file: syscall.e


Module functions:

void HandleMsgSend( Thread *dest, int payload ) Sends a message whose value is payload to dest.

If the recipient thread is dead or dest is NULL the sender will be killed.

int HandleMsgRecv( Thread *src, Message *reply ) Checks whether the current thread has a message from src, or from any thread if src is NULL: if so it fills the reply value with the one from the message and leaves the calling thread in the ready queue; otherwise the caller is placed in the wait queue.

The caller will be terminated if an invalid reply pointer is used.

void DeliverMsg( Thread *src, Thread *dest, int payload )


Look at the code: syscall.cc


Go to index, previous page, next page