mirror of
https://github.com/tribes2/engine.git
synced 2026-03-28 16:49:24 +00:00
t2 engine svn checkout
This commit is contained in:
commit
ff569bd2ae
988 changed files with 394180 additions and 0 deletions
26
platform/platformSemaphore.h
Normal file
26
platform/platformSemaphore.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// V12 Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
// Portions Copyright (c) 2001 by Sierra Online, Inc.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _PLATFORMSEMAPHORE_H_
|
||||
#define _PLATFORMSEMAPHORE_H_
|
||||
|
||||
#ifndef _TYPES_H_
|
||||
#include "Platform/types.h"
|
||||
#endif
|
||||
|
||||
struct Semaphore
|
||||
{
|
||||
static void * createSemaphore(U32 initialCount = 1);
|
||||
static void destroySemaphore(void * semaphore);
|
||||
static bool acquireSemaphore(void * semaphore, bool block = true);
|
||||
static void releaseSemaphore(void * semaphore);
|
||||
|
||||
inline static bool P(void * semaphore, bool block = true) {return(acquireSemaphore(semaphore, block));}
|
||||
inline static void V(void * semaphore) {releaseSemaphore(semaphore);}
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue