---
name: "ACE_cond_t"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_cond_t"
---

# ACE\_cond\_t(3)

This structure is used to implement condition variables on platforms that lack it natively, such as VxWorks, pSoS, and Win32.

## NAME

ACE\_cond\_t -  This structure is used to implement condition variables on platforms that lack it natively, such as VxWorks, pSoS, and Win32.

## SYNOPSIS

```
#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_;
};
```

## DESCRIPTION

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.

## 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
