[comp.sys.transputer] Parallel-C and the use of events: HELP ...

BIOMED06@CZHETH5A.BITNET (08/12/88)

Problems using the Event in 3L Parallel C:
     
We are using a Transputernetwork for some Realtime-Signal-Processing.
To synchronize our software-processes with the surrounding hardware we intend
to use the Event-Request. The transputer-pin Event is connected with a
periodic timersignal (period = 5..800 ms).
     
1. Question:
-----------
Is the following function correct?
     
#include <chan.h>
     
void synchronize()
{
        char ch;
     
        chan_in_byte(&ch, EventReq);
        chan_in_byte(&ch, EventReq);
}
     
2. Question:
-----------
Has anybody experience using Event in Multithreaded tasks.
We are synchronizing the different threads using the semaphore functions of
Parallel C.
As long as we do not synchronize the hole task with the hardware using event,
all threads proceed. Otherwise several threads do not get their start
semaphores, allthough the sema_signal() function has been called in the
main thread with the right arguments.
The system behaves like some semaphores would get corrupted by the
synchronize() function.