# IpcSemaphoreBinding

`import { IpcSemaphoreBinding } from "destack:ipc/binding";`

Semaphore binding family.

```ds title="IpcSemaphoreBinding"
export interface IpcSemaphoreBinding {
    createSemaphore(name: &'a readonly string, options: SemaphoreOptions): Result<SemaphoreHandle, HostError>;
    openSemaphore(name: &'a readonly string, flags: SemaphoreFlags): Result<SemaphoreHandle, HostError>;
    closeSemaphore(semaphore: SemaphoreHandle): Result<void, HostError>;
    removeSemaphore(name: &'a readonly string): Result<void, HostError>;
    waitSemaphore(semaphore: SemaphoreHandle, timeoutNanoseconds?: uint64 | undefined): Result<void, HostError>;
    postSemaphore(semaphore: SemaphoreHandle, count: uint32): Result<void, HostError>;
}
```

[language/library/src/ipc/binding/semaphore.ds:24:84](https://github.com/destack-sh/destack/blob/main/language/library/src/ipc/binding/semaphore.ds#L24-L84)

## Members

### `createSemaphore(name: &'a readonly string, options: SemaphoreOptions): Result<SemaphoreHandle, HostError>`

Create one named semaphore.

### `openSemaphore(name: &'a readonly string, flags: SemaphoreFlags): Result<SemaphoreHandle, HostError>`

Open one named semaphore.

### `closeSemaphore(semaphore: SemaphoreHandle): Result<void, HostError>`

Close one semaphore handle.

### `removeSemaphore(name: &'a readonly string): Result<void, HostError>`

Remove one named semaphore.

### `waitSemaphore(semaphore: SemaphoreHandle, timeoutNanoseconds?: uint64 | undefined): Result<void, HostError>`

Wait for one semaphore count.

### `postSemaphore(semaphore: SemaphoreHandle, count: uint32): Result<void, HostError>`

Increment one semaphore count.
