|
Does anyone have any code that implements semaphores and shows where they
might be useful? That is one place that the documentation seems a little
weak. Thanks,
Sam
|
|
Message has 1 Reply: | | Re: semaphores
|
| a short example: #include <semaphore.h> // for semaphore opperations // global buffer, used to store incoming messages. // the buffer is checked by the application waiting for the message. struct inn_msg{ char *msg; sem_t lock; }; //create a (...) (23 years ago, 9-May-02, to lugnet.robotics.rcx.legos)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|