home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume27 / distributed-c-2.1 / part01 / examples / prod_cons / config.h next >
Encoding:
C/C++ Source or Header  |  1993-12-22  |  2.0 KB  |  48 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  * @@@@  @@@ @@@@@ @@@@@ @@@@@ @@@ @@@@  @   @ @@@@@ @@@@@ @@@@       @@@  *
  4.  * @   @  @  @       @   @   @  @  @   @ @   @   @   @     @   @     @   @ *
  5.  * @   @  @  @@@@@   @   @@@@@  @  @@@@@ @   @   @   @@@@@ @   @     @     *
  6.  * @   @  @      @   @   @ @    @  @   @ @   @   @   @     @   @     @   @ *
  7.  * @@@@  @@@ @@@@@   @   @  @  @@@ @@@@  @@@@@   @   @@@@@ @@@@       @@@  *
  8.  *                                                                         *
  9.  *              A compiler for distributed programming with C              *
  10.  *                                                                         *
  11.  *                             c o n f i g . h                             *
  12.  *                                                                         *
  13.  *                 Version 1.0      CreationDate: 17.07.91                 *
  14.  *                                    LastUpDate: 17.07.91                 *
  15.  *                                                                         *
  16.  *  Configuration file for all modules of the producer/consumer example.   *
  17.  *                                                                         *
  18.  *              Copyright (C) 1990,1991 by Christoph Pleier.               *
  19.  *                          All rights reserved!                           *
  20.  ***************************************************************************/
  21.  
  22. /* function return codes */
  23. #define OK        0
  24. #define ERROR        -1
  25.  
  26. /* type of a message */
  27. struct msg_t {
  28.     char name[100];
  29.     long value;
  30. };
  31.  
  32. /*
  33.  * process specifications
  34.  */
  35.  
  36. process spec buffer()
  37. {
  38.     /* write a message into buffer */
  39.     trans int b_write(struct msg_t msg); 
  40.  
  41.     /* read a message from buffer */
  42.     trans struct msg_t b_read();
  43. }
  44.  
  45. process spec producer(int num, process buffer buffer_descr, long msgnum);
  46.  
  47. process spec consumer(int num, process buffer buffer_descr);
  48.