view user/lib/ipc.c3 @ 410:6aa9743ed362 tip

Reflect change in c3 public modifier
author Windel Bouwman
date Mon, 23 Feb 2015 21:06:04 +0100
parents 0fb6633c42f6
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?
}

public function void SendMessage(Msg *msg)
{
    var int x;
    x=kernelTrap(MSG_SEND, 1, 0)
}

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