ACE_cond_t(3)

ACE_cond_t3

This structure is used to implement condition variables on platforms that lack it natively, such as vxworks, psos, and win32.

Usage

#include <ace/OS.h>
class ACE_cond_t
{
  public:
    friend class ACE_OS;
    long waiters (void) const;
  protected:
    long waiters_;
    ACE_thread_mutex_t waiters_lock_;
    ACE_sema_t sema_;
    ACE_sema_t waiters_done_;
    HANDLE waiters_done_;
    size_t was_broadcast_;
};

Overview

At the current time, this stuff only works for threads within the same process.

Public members

friend class ACE_OS;
long waiters (void) const;

Returns the number of waiters.

Protected members

long waiters_;

Number of waiting threads.

ACE_thread_mutex_t waiters_lock_;

Serialize access to the waiters count.

ACE_sema_t sema_;

Queue up threads waiting for the condition to become signaled.

ACE_sema_t waiters_done_;

A semaphore used by the broadcast/signal thread to wait for all the waiting thread(s) to wake up and be released from the semaphore.

HANDLE waiters_done_;

An auto reset event used by the broadcast/signal thread to wait for the waiting thread(s) to wake up and get a chance at the semaphore.

size_t was_broadcast_;

Keeps track of whether we were broadcasting or just signaling.

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.