1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 20:22:30 +01:00
rpcs3/Utilities/rConcurrency.h
Peter Tissen c37905e465 initial start to eliminate static func init, not compilable atm
move module initialization into a module manager, still has some issues like stopping not working and debug crashing

add #idef 0 to modules that aren't in the windows project

don't double initialize and don't de-initialize for now, since many modules don't expect it and it leads to many errors

remove duplicate module lists for empty modules and implemented ones, make Module non-copyable but movable

add secondary project, no real use for it now

add some memleak config to the emucore and add asmjit path to rpcs3

small rebase error fixed to get it to compile again

add filters for emucore

re-add the module manager and static file

WIP commit, linker errors abound

some more abstraction layer stuff

fix the remaining linker errors, re-enable platform specific mouse, pad and keyboard handlers

rebasing

fix memset undefined and re() usage of se_t before declaration

Add wxGUI define by default for cmake builds

fix copy constructors of Datetime header

fix copy constructors of other wx interface classes

remove static declarations of global variables

make wxGLCanvas constructor non-ambiguous even with wx2.8. compat mode, fix wrong std::exception constructor calls

remove duplicate definition for FromUTF8 and ToUTF8

temp changes
2014-06-08 23:16:06 +02:00

59 lines
893 B
C++

#pragma once
enum rSemaStatus
{
rSEMA_BUSY,
rSEMA_OTHER
};
struct rSemaphore
{
rSemaphore();
rSemaphore(const rSemaphore& other) = delete;
~rSemaphore();
rSemaphore(int initial_count, int max_count);
void Wait();
rSemaStatus TryWait();
void Post();
void WaitTimeout(u64 timeout);
private:
void *handle;
};
struct rCriticalSection
{
rCriticalSection();
rCriticalSection(const rCriticalSection& other) = delete;
~rCriticalSection();
void Enter();
void Leave();
void *handle;
};
struct rTimer
{
rTimer();
rTimer(const rTimer& other) = delete;
~rTimer();
void Start();
void Stop();
private:
void *handle;
};
void rSleep(u32 time);
void rMicroSleep(u64 time);
struct rCriticalSectionLocker
{
rCriticalSectionLocker(const rCriticalSection& other);
~rCriticalSectionLocker();
private:
void *handle;
};
struct rThread
{
static bool IsMain();
};
void rYieldIfNeeded();