repo.or.cz
/
AROS.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
kernel.resource: Make includes part of compiler-includes
[AROS.git]
/
test
/
exec
/
portreceive.c
blob
9438f7145e277e9dba34a6fd78f2ac7331b1c4ff
1
#include <proto/exec.h>
2
#include <proto/alib.h>
3
4
#include <exec/ports.h>
5
#include <stdio.h>
6
7
int
main
(
void
)
8
{
9
struct
Message
*
msg
;
10
struct
MsgPort
*
port
;
11
12
port
=
CreatePort
(
"PORTTEST"
,
0
);
13
if
(
port
==
NULL
)
14
{
15
puts
(
"Error creating port"
);
16
return
20
;
17
}
18
19
WaitPort
(
port
);
20
msg
=
GetMsg
(
port
);
21
puts
(
"Message received"
);
22
ReplyMsg
(
msg
);
23
puts
(
"Message returned"
);
24
25
DeletePort
(
port
);
26
27
return
0
;
28
}