NAME

ACE_Semaphore - Wrapper for Dijkstra style general semaphores.

SYNOPSIS


#include <ace/Synch.h>


class ACE_Semaphore
{
  public:
    ACE_Semaphore (
        u_int count,
        int type = USYNC_THREAD,
        LPCTSTR name = 0,
        void * = 0,
        int max = 0x7fffffff
        );
    ~ACE_Semaphore (void);
    int remove (void);
    int acquire (void);
    int tryacquire (void);
    int release (void);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
    const ACE_sema_t &lock (void) const;
  private:
    ACE_sema_t semaphore_;
    inline void operator= (const ACE_Semaphore &);
    inline ACE_Semaphore (const ACE_Semaphore &);
};

DESCRIPTION

Wrappers for various synchronization routines.

Initialization and termination.

ACE_Semaphore (
    u_int count,
    int type = USYNC_THREAD,
    LPCTSTR name = 0,
    void * = 0,
    int max = 0x7fffffff
    );
~ACE_Semaphore (void);
int remove (void);
int acquire (void);
int tryacquire (void);
int release (void);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
const ACE_sema_t &lock (void) const;

Prevent assignment and initialization.

inline void operator= (const ACE_Semaphore &);
inline ACE_Semaphore (const ACE_Semaphore &);

AUTHOR

Doug Schmidt

LIBRARY

ace