source: abuse/tags/pd/imlib/port/unix/shm_client.c @ 49

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