view user/ipc.c3 @ 341:4d204f6f7d4e devel

Rewrite of assembler parts
author Windel Bouwman
date Fri, 28 Feb 2014 18:07:14 +0100
parents 084cccaa5deb
children
line wrap: on
line source


module ipc;

type struct {
    int sender;
    int cmd;
    int data1;
    int data2;
    int data3;
    int data4;
} Msg;

const int MSG_SEND=1;
const int MSG_RECV=2;

function int kernelTrap(int msgId, int a, int b)
{
    // TODO: make this in assembler?
}

function void SendMessage(Msg *msg)
{
    kernelTrap(MSG_SEND, 1, 0)
}

function void receive_message(Msg *msg)
{
    kernelTrap(MSG_RECV, 2, 0);
}