view user/ipc.c3 @ 314:38f5f298ce0e

Add log for interference graph
author Windel Bouwman
date Wed, 18 Dec 2013 20:22:20 +0100
parents 04cf4d26a3bc
children 084cccaa5deb
line wrap: on
line source


module ipc;

type struct {
    int sender;
    int data;
} 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 RecvMessage(Msg msg)
{
    kernelTrap(MSG_RECV, 2, 0);
}