Updated PCI IDs to latest snapshot.
[tangerine.git] / test / portsend.c
blobac9dcbb7401e86c6d25362c7a3fdd55f36617e28
1 #include <proto/exec.h>
2 #include <proto/alib.h>
4 #include <exec/ports.h>
5 #include <stdio.h>
7 int main(void)
9 struct Message msg, *msg2;
10 struct MsgPort *port;
12 port = FindPort("VARTEST");
13 if (port==NULL)
15 puts("Port not found");
16 return 20;
18 msg.mn_ReplyPort = CreatePort(NULL, 0);
19 if (msg.mn_ReplyPort==NULL)
21 puts("Error creating port");
22 return 20;
25 PutMsg(port, &msg);
26 WaitPort(msg.mn_ReplyPort);
27 msg2 = GetMsg(msg.mn_ReplyPort);
28 DeletePort(msg.mn_ReplyPort);
29 if (msg2!=&msg)
30 puts("Wrong message returned");
31 else
32 puts("Message returned");
34 return 0;