1 #include "ace/Process_Semaphore.h"
2 #include "ace/OS_NS_unistd.h"
3 #include "ace/Log_Msg.h"
5 int ACE_TMAIN (int, ACE_TCHAR
*[])
8 ACE_Process_Semaphore
s (0, ACE_TEXT ("AceTest"));
10 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("Worker is going to acquire semaphore\n")));
14 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("Worker has acquired semaphore\n")));
16 // Do some init stuff. Simulated by a sleep...
21 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT ("Worker released semaphore\n")));