home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / ABUSESRC.ZIP / AbuseSrc / imlib / port / unix / shm_client.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-13  |  378 b   |  26 lines

  1. #define dprintf printf
  2. #include "shm_fifo.c"
  3. #include <stdio.h>
  4.  
  5.  
  6. main()
  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.  
  26.