NAME
ACE_sema_t -
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
.
SYNOPSIS
#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_;
u_long waiters_;
Number of threads that have called ACE_OS::sema_wait
.
AUTHOR
Doug Schmidt schmidt@cs.wustl.edu
, Jesper S. M|ller
stophph@diku.dk
, and a cast of thousands...
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