comparison user/lib/ipc.c3 @ 402:0fb6633c42f6

Moved several files to logical locations
author Windel Bouwman
date Thu, 19 Feb 2015 00:13:07 +0100
parents user/ipc.c3@084cccaa5deb
children 6aa9743ed362
comparison
equal deleted inserted replaced
401:994c00d55fd5 402:0fb6633c42f6
1
2 module ipc;
3
4 type struct {
5 int sender;
6 int cmd;
7 int data1;
8 int data2;
9 int data3;
10 int data4;
11 } Msg;
12
13 const int MSG_SEND=1;
14 const int MSG_RECV=2;
15
16 function int kernelTrap(int msgId, int a, int b)
17 {
18 // TODO: make this in assembler?
19 }
20
21 function void SendMessage(Msg *msg)
22 {
23 var int x;
24 x=kernelTrap(MSG_SEND, 1, 0)
25 }
26
27 function void receive_message(Msg *msg)
28 {
29 var int x;
30 x=kernelTrap(MSG_RECV, 2, 0);
31 }
32