[Scummvm-cvs-logs] SF.net SVN: scummvm:[49439] scummvm/branches/gsoc2010-opengl/backends/mutex

vgvgf at users.sourceforge.net vgvgf at users.sourceforge.net
Sat Jun 5 19:38:13 CEST 2010


Revision: 49439
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49439&view=rev
Author:   vgvgf
Date:     2010-06-05 17:38:12 +0000 (Sat, 05 Jun 2010)

Log Message:
-----------
Created SdlMutexManager.

Added Paths:
-----------
    scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/
    scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.cpp
    scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.h

Added: scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.cpp	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.cpp	2010-06-05 17:38:12 UTC (rev 49439)
@@ -0,0 +1,48 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "backends/mutex/sdl/sdl-mutex.h"
+
+#if defined(__SYMBIAN32__)
+#include <esdl\SDL.h>
+#else
+#include <SDL.h>
+#endif
+
+OSystem::MutexRef SdlMutexManager::createMutex() {
+	return (OSystem::MutexRef) SDL_CreateMutex();
+}
+
+void SdlMutexManager::lockMutex(OSystem::MutexRef mutex) {
+	SDL_mutexP((SDL_mutex *) mutex);
+}
+
+void SdlMutexManager::unlockMutex(OSystem::MutexRef mutex) {
+	SDL_mutexV((SDL_mutex *) mutex);
+}
+
+void SdlMutexManager::deleteMutex(OSystem::MutexRef mutex) {
+	SDL_DestroyMutex((SDL_mutex *) mutex);
+}


Property changes on: scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.cpp
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Added: scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.h	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.h	2010-06-05 17:38:12 UTC (rev 49439)
@@ -0,0 +1,40 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef BACKENDS_MUTEX_SDL_H
+#define BACKENDS_MUTEX_SDL_H
+
+#include "backends/mutex/default/default-mutex.h"
+
+class SdlMutexManager : public DefaultMutexManager {
+public:
+	OSystem::MutexRef createMutex();
+	void lockMutex(OSystem::MutexRef mutex);
+	void unlockMutex(OSystem::MutexRef mutex);
+	void deleteMutex(OSystem::MutexRef mutex);
+};
+
+
+#endif


Property changes on: scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list