---
name: "ACE_Thread_Semaphore"
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_Thread_Semaphore"
---

# ACE\_Thread\_Semaphore(3)

Wrapper for Dijkstra style general semaphores that work only within one process.

## NAME

ACE\_Thread\_Semaphore -  Wrapper for Dijkstra style general semaphores that work only within one process.

## SYNOPSIS

```
#include <ace/Synch.h>
class ACE_Thread_Semaphore : public ACE_Semaphore
{
  public:
    ACE_Thread_Semaphore (
        u_int count = 1,
        LPCTSTR name = 0,
        void * = 0,
        int max = 0x7FFFFFFF
        );
    ~ACE_Thread_Semaphore (void);
    void dump (void) const;
    ACE_ALLOC_HOOK_DECLARE;
};
```

## DESCRIPTION

Wrappers for various synchronization routines.

## PUBLIC MEMBERS

```
ACE_Thread_Semaphore (
    u_int count = 1,
    LPCTSTR name = 0,
    void * = 0,
    int max = 0x7FFFFFFF
    );
```

Initialize the semaphore, with an initial value of count, maximum value of max, and unlocked by default.

```
~ACE_Thread_Semaphore (void);
```

Default dtor.

```
void dump (void) const;
```

Dump the state of an object.

```
ACE_ALLOC_HOOK_DECLARE;
```

Declare the dynamic allocation hooks.

## AUTHOR

Doug Schmidt

## LIBRARY

ace
