OGRE-Next: Ogre::Semaphore Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Ogre::Semaphore Class Reference

Implements a semaphore. More...

`#include <OgreSemaphore.h>`

## Public Member Functions
| Semaphore (uint32_t intialCount)
| ~Semaphore ()
bool | decrementOrWait ()
| Decrements the semaphore by 1.
bool | increment ()
| Increments the semaphore by 1.
bool | increment (uint32_t value)
| Increments the semaphore by the given value.

## Detailed Description

Implements a semaphore.

## Constructor & Destructor Documentation

## ◆ Semaphore()

Ogre::Semaphore::Semaphore | ( | uint32_t | intialCount | ) |

## ◆ ~Semaphore()

Ogre::Semaphore::~Semaphore | ( |  | ) |

## Member Function Documentation

## ◆ decrementOrWait()

bool Ogre::Semaphore::decrementOrWait | ( |  | ) |

Decrements the semaphore by 1.

If the value would reach -1, it blocks the thread and clamps it to 0

On error returns false, true if everything's ok.

## ◆ increment() [1/2]

bool Ogre::Semaphore::increment | ( |  | ) |

Increments the semaphore by 1.

May wake up a thread stalled on decrement()

On error returns false, true if everything's ok.

## ◆ increment() [2/2]

bool Ogre::Semaphore::increment | ( | uint32_t | value | ) |

Increments the semaphore by the given value.

The documentation for this class was generated from the following file:

- OgreSemaphore.h