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

  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.  
  27.