The function linked into user programs to send a message to an operating system process is:
int _syscall(int destination, int fncNum, message *msg);
- destination: endpoint number of the receiving operating system process
- fncNum: an integer associated with the operating system function to be executed.
- msg: the address of a message structure
The message structure should be initialized and filled in with any appropriate values to be transferred to the operating system function.
The destination operating system process will receive the message, including the fncNum, and will use this number to access a pointer the corresponding function. It then uses the pointer to invoke the function.
The function should put its results into a reply message structure located in the original caller's process table.
Finally, the reply message is transferred back to the user process. The reply is copied back by the kernel process into the message structure parameter the user process passed to _syscall.