Last change
on this file since 636 was
49,
checked in by Sam Hocevar, 15 years ago
|
- Imported original public domain release, for future reference.
|
-
Property svn:keywords set to
Id
|
File size:
375 bytes
|
Line | |
---|
1 | #define dprintf printf |
---|
2 | #include "shm_fifo.c" |
---|
3 | #include <stdio.h> |
---|
4 | |
---|
5 | main() |
---|
6 | { |
---|
7 | shm_fifo a; |
---|
8 | a.create(100); |
---|
9 | shm_fifo b; |
---|
10 | b.create(100); |
---|
11 | |
---|
12 | printf("ids = %d %d\n",a.shm_id,b.shm_id); |
---|
13 | a.wait_attach(); |
---|
14 | b.wait_attach(); |
---|
15 | |
---|
16 | int i; |
---|
17 | for (i=0;i<100;i++) |
---|
18 | { |
---|
19 | char msg[100]; |
---|
20 | a.read(msg,12); |
---|
21 | printf("MSG : %s\n",msg); |
---|
22 | char stat=1; |
---|
23 | b.write(&stat,1); |
---|
24 | } |
---|
25 | } |
---|
26 | |
---|
Note: See
TracBrowser
for help on using the repository browser.