aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alMain.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-01-09 23:37:03 -0800
committerChris Robinson <[email protected]>2012-01-09 23:37:03 -0800
commit535091e36c994b9c9363728cfa348f70ba545811 (patch)
treeb138481972bdec757ab4aee414f389987bfe820e /OpenAL32/Include/alMain.h
parent5b7f8c1816544102011815ee570093c3ae7d339e (diff)
Make LockDevice, LockContext, etc, inline
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r--OpenAL32/Include/alMain.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index b8057fa1..3cc82617 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -758,10 +758,16 @@ void AppendDeviceList(const ALCchar *name);
void AppendAllDeviceList(const ALCchar *name);
void AppendCaptureDeviceList(const ALCchar *name);
-ALCvoid LockDevice(ALCdevice *device);
-ALCvoid UnlockDevice(ALCdevice *device);
-ALCvoid LockContext(ALCcontext *context);
-ALCvoid UnlockContext(ALCcontext *context);
+static __inline void LockDevice(ALCdevice *device)
+{ EnterCriticalSection(&device->Mutex); }
+static __inline void UnlockDevice(ALCdevice *device)
+{ LeaveCriticalSection(&device->Mutex); }
+
+static __inline void LockContext(ALCcontext *context)
+{ LockDevice(context->Device); }
+static __inline void UnlockContext(ALCcontext *context)
+{ UnlockDevice(context->Device); }
+
ALvoid *StartThread(ALuint (*func)(ALvoid*), ALvoid *ptr);
ALuint StopThread(ALvoid *thread);