NAME

ACE_Semaphore - Wrapper for Dijkstra style general semaphores.

SYNOPSIS

#include <ace/Synch.h>

class ACE_Semaphore { public: ACE_Semaphore ( u_int count = 1, int type = USYNC_THREAD, LPCTSTR name = 0, void * = 0, int max = 0x7fffffff ); ~ACE_Semaphore (void); int remove (void); int acquire (void); int acquire (ACE_Time_Value &tv); int tryacquire (void); int release (void); int release (size_t release_count); int acquire_read (void); int acquire_write (void); int tryacquire_read (void); int tryacquire_write (void); void dump (void) const; ACE_ALLOC_HOOK_DECLARE; const ACE_sema_t &lock (void) const; protected: ACE_sema_t semaphore_; private: void operator= (const ACE_Semaphore &); ACE_Semaphore (const ACE_Semaphore &); };

DESCRIPTION

Wrappers for various synchronization routines.

Initialization and termination.

ACE_Semaphore (
    u_int count = 1,
    int type = USYNC_THREAD,
    LPCTSTR name = 0,
    void * = 0,
    int max = 0x7fffffff
    );

~ACE_Semaphore (void);

int remove (void);

int acquire (void);

int acquire (ACE_Time_Value &tv);

int tryacquire (void);

int release (void);

int release (size_t release_count);

int acquire_read (void);

int acquire_write (void);

int tryacquire_read (void);

int tryacquire_write (void);

void dump (void) const;

ACE_ALLOC_HOOK_DECLARE;

const ACE_sema_t &lock (void) const;

Prevent assignment and initialization.

void operator= (const ACE_Semaphore &);

ACE_Semaphore (const ACE_Semaphore &);

AUTHOR

Doug Schmidt

LIBRARY

ace