ACE_sema_t(3)

ACE_sema_t3

This is used to implement semaphores for platforms that support posix pthreads, but do *not* support posix semaphores, i.e., it's a different type than the posix sem_t.

Usage

#include <ace/OS.h>
class ACE_sema_t
{
  public:
    friend class ACE_OS;
    ACE_thread_mutex_t lock_;
    ACE_event_t count_nonzero_;
    u_int count_;
  protected:
    ACE_mutex_t lock_;
    ACE_cond_t count_nonzero_;
    u_long count_;
    u_long waiters_;
};

Public members

friend class ACE_OS;
ACE_thread_mutex_t lock_;

Serializes access to count_.

ACE_event_t count_nonzero_;

This event is signaled whenever the count becomes non-zero.

u_int count_;

Current count of the semaphore.

Protected members

ACE_mutex_t lock_;

Serialize access to internal state.

ACE_cond_t count_nonzero_;

Block until there are no waiters.

u_long count_;

Count of the semaphore.

u_long waiters_;

Number of threads that have called ACE_OS::sema_wait.

The ACE_Sched_Priority type should be used for platform-

independent thread and process priorities, by convention. int should be used for OS-specific priorities.

typedef for the _stat data structure

Giving unique ACE scoped names for some important

RTSignal-Related constants. Becuase sometimes, different platforms use different names for these constants.

Library

ace

Author

Doug Schmidt [email protected], Jesper S. M|ller [email protected], and a cast of thousands...

From libace-doc 5.0.7-4 in Debian 2.2 (Potato). Parsed by carta from the page's man source.