aboutsummaryrefslogtreecommitdiff
path: root/morphos/morphos.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'morphos/morphos.cpp')
-rw-r--r--morphos/morphos.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/morphos/morphos.cpp b/morphos/morphos.cpp
index 6009de7dbc..1b08b0c715 100644
--- a/morphos/morphos.cpp
+++ b/morphos/morphos.cpp
@@ -277,6 +277,31 @@ void *OSystem_MorphOS::create_thread(ThreadProc *proc, void *param)
return ScummMusicThread;
}
+void *OSystem_MorphOS::create_mutex(void)
+{
+ struct SignalSemaphore *sem = (struct SignalSemaphore *)AllocVec( sizeof( struct SignalSemaphore ), MEMF_PUBLIC );
+
+ if( sem )
+ InitSemaphore( sem );
+
+ return sem;
+}
+
+void OSystem_MorphOS::lock_mutex(void *mutex)
+{
+ ObtainSemaphore( (struct SignalSemaphore *)mutex );
+}
+
+void OSystem_MorphOS::unlock_mutex(void *mutex)
+{
+ ReleaseSemaphore( (struct SignalSemaphore *)mutex );
+}
+
+void OSystem_MorphOS::delete_mutex(void *mutex)
+{
+ FreeVec( mutex );
+}
+
uint32 OSystem_MorphOS::property(int param, Property *value)
{
switch( param )