again, re-add some windows stuff Revert "possibly controversial commit: remove all windows sources, keeping only the windows cmake so that we can generate an sln to edit the code"

This reverts commit 48ba7961eb.
This commit is contained in:
DarthArgus
2016-07-23 18:01:50 -07:00
parent efaaa4bb42
commit 9b369713e1
173 changed files with 16448 additions and 0 deletions
@@ -0,0 +1,37 @@
// ======================================================================
//
// Semaphore.cpp
// Acy Stapp
//
// Copyright 6/19/2001 Sony Online Entertainment
//
// ======================================================================
#include "sharedSynchronization/FirstSharedSynchronization.h"
#include "sharedSynchronization/Semaphore.h"
Semaphore::Semaphore(int count, int initial)
{
handle = CreateSemaphore(0, initial, count, 0);
}
Semaphore::~Semaphore()
{
CloseHandle(handle);
}
void Semaphore::wait()
{
WaitForSingleObject(handle, INFINITE);
}
void Semaphore::wait(unsigned int maxDurationMs)
{
WaitForSingleObject(handle, maxDurationMs);
}
void Semaphore::signal(int count)
{
ReleaseSemaphore(handle, count, 0);
}