6 int main(int count
, char **args
) {
8 sem_id portSem
= atoi(args
[2]);
9 port_id port
= atoi(args
[1]);
11 for (int i
=0; i
<10; i
++) {
15 ssize_t size
= port_buffer_size(port
);
16 printf("size : %ld\n", size
);
21 if ((newsize
= read_port(port
, &code
, buffer
, size
))==size
) {
23 if (msg
.Unflatten(buffer
)!=B_OK
) {
29 printf("error %ld\n", newsize
);