Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

examp14.cpp

This example is to show use of the SemaphoreGroup and Semaphore.

For this test we use the GatewaySemaphoreGroup. We create two semaphores, each with a GatewayCount of three (3).

while the Parent thread (main) releases the resources on the first semaphore, it consumes resources on the second.

while the Child thread (threadCountTest) consumes resources on the first, it releases them on the second.


This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium