home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************
- * *
- * @@@@ @@@ @@@@@ @@@@@ @@@@@ @@@ @@@@ @ @ @@@@@ @@@@@ @@@@ @@@ *
- * @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ *
- * @ @ @ @@@@@ @ @@@@@ @ @@@@@ @ @ @ @@@@@ @ @ @ *
- * @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ *
- * @@@@ @@@ @@@@@ @ @ @ @@@ @@@@ @@@@@ @ @@@@@ @@@@ @@@ *
- * *
- * A compiler for distributed programming with C *
- * *
- * p r o d u c e r . d c *
- * *
- * Version 1.0 CreationDate: 17.07.91 *
- * LastUpDate: 17.07.91 *
- * *
- * Process building a producer for the producer/consumer example. *
- * *
- * Copyright (C) 1990,1991 by Christoph Pleier. *
- * All rights reserved! *
- ***************************************************************************/
-
- #include "config.h"
-
- /* definition of the process 'producer' */
- process body producer(num, buffer_descr, msgnum)
- {
- long msg_count; /* to count the produced messages */
- struct msg_t msg; /* to store the actual message */
-
- for(msg_count = 0; msg_count < msgnum; ++msg_count) {
- sprintf(msg.name, "producer: %d", num);
- msg.value = msg_count;
- do {
- } while(buffer_descr@b_write(msg) == ERROR);
- }
- exit(0);
- } /* process body producer */
-