diff options
Diffstat (limited to '3rdparty/bx/include/bx/semaphore.h')
-rw-r--r-- | 3rdparty/bx/include/bx/semaphore.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/3rdparty/bx/include/bx/semaphore.h b/3rdparty/bx/include/bx/semaphore.h new file mode 100644 index 00000000000..867fa9e7cde --- /dev/null +++ b/3rdparty/bx/include/bx/semaphore.h @@ -0,0 +1,40 @@ +/* + * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_SEM_H_HEADER_GUARD +#define BX_SEM_H_HEADER_GUARD + +#include "bx.h" + +namespace bx +{ + /// + class Semaphore + { + BX_CLASS(Semaphore + , NO_COPY + , NO_ASSIGNMENT + ); + + public: + /// + Semaphore(); + + /// + ~Semaphore(); + + /// + void post(uint32_t _count = 1); + + /// + bool wait(int32_t _msecs = -1); + + private: + BX_ALIGN_DECL(16, uint8_t) m_internal[128]; + }; + +} // namespace bx + +#endif // BX_SEM_H_HEADER_GUARD |