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

vgvgf at users.sourceforge.net vgvgf at users.sourceforge.net
Thu Jun 10 05:18:16 CEST 2010


Revision: 49556
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49556&view=rev
Author:   vgvgf
Date:     2010-06-10 03:18:16 +0000 (Thu, 10 Jun 2010)

Log Message:
-----------
Added an abstract version of MutexManager. Deleted DefaultMutexManager, now it's NullMutexManager.

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

Added Paths:
-----------
    scummvm/branches/gsoc2010-opengl/backends/mutex/abstract-mutex.h
    scummvm/branches/gsoc2010-opengl/backends/mutex/null/
    scummvm/branches/gsoc2010-opengl/backends/mutex/null/null-mutex.h

Removed Paths:
-------------
    scummvm/branches/gsoc2010-opengl/backends/mutex/default/

Added: scummvm/branches/gsoc2010-opengl/backends/mutex/abstract-mutex.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/mutex/abstract-mutex.h	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/mutex/abstract-mutex.h	2010-06-10 03:18:16 UTC (rev 49556)
@@ -0,0 +1,41 @@
+/* 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_ABSTRACT_H
+#define BACKENDS_MUTEX_ABSTRACT_H
+
+#include "common/system.h"
+#include "common/noncopyable.h"
+
+class MutexManager : Common::NonCopyable {
+public:
+	virtual OSystem::MutexRef createMutex() = 0;
+	virtual void lockMutex(OSystem::MutexRef mutex) = 0;
+	virtual void unlockMutex(OSystem::MutexRef mutex) = 0;
+	virtual void deleteMutex(OSystem::MutexRef mutex) = 0;
+};
+
+
+#endif


Property changes on: scummvm/branches/gsoc2010-opengl/backends/mutex/abstract-mutex.h
___________________________________________________________________
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/null/null-mutex.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/mutex/null/null-mutex.h	                        (rev 0)
+++ scummvm/branches/gsoc2010-opengl/backends/mutex/null/null-mutex.h	2010-06-10 03:18:16 UTC (rev 49556)
@@ -0,0 +1,39 @@
+/* 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_NULL_H
+#define BACKENDS_MUTEX_NULL_H
+
+#include "backends/mutex/abstract-mutex.h"
+
+class NullMutexManager : MutexManager {
+public:
+	OSystem::MutexRef createMutex() { return OSystem::MutexRef(); }
+	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/null/null-mutex.h
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author URL Id
Added: svn:eol-style
   + native

Modified: scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.h
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.h	2010-06-10 03:16:50 UTC (rev 49555)
+++ scummvm/branches/gsoc2010-opengl/backends/mutex/sdl/sdl-mutex.h	2010-06-10 03:18:16 UTC (rev 49556)
@@ -26,9 +26,9 @@
 #ifndef BACKENDS_MUTEX_SDL_H
 #define BACKENDS_MUTEX_SDL_H
 
-#include "backends/mutex/default/default-mutex.h"
+#include "backends/mutex/abstract-mutex.h"
 
-class SdlMutexManager : public DefaultMutexManager {
+class SdlMutexManager : public MutexManager {
 public:
 	OSystem::MutexRef createMutex();
 	void lockMutex(OSystem::MutexRef mutex);


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