diff options
author | Alejandro Marzini | 2010-07-03 00:13:45 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-03 00:13:45 +0000 |
commit | fda9416cc8b64fa7371b7a9989def9cc318efc7e (patch) | |
tree | 2cdb4c6714e0cb8bbcd6ea03c5b467b6ade50e4b /backends/mutex | |
parent | f9c3a4547cbf1b1942402d618fa403a7fb1cb656 (diff) | |
download | scummvm-rg350-fda9416cc8b64fa7371b7a9989def9cc318efc7e.tar.gz scummvm-rg350-fda9416cc8b64fa7371b7a9989def9cc318efc7e.tar.bz2 scummvm-rg350-fda9416cc8b64fa7371b7a9989def9cc318efc7e.zip |
Cleanup and documentation.
svn-id: r50609
Diffstat (limited to 'backends/mutex')
-rw-r--r-- | backends/mutex/mutex.h | 5 | ||||
-rw-r--r-- | backends/mutex/null/null-mutex.h | 11 | ||||
-rw-r--r-- | backends/mutex/sdl/sdl-mutex.h | 11 |
3 files changed, 18 insertions, 9 deletions
diff --git a/backends/mutex/mutex.h b/backends/mutex/mutex.h index d8647bae13..ddf27d5932 100644 --- a/backends/mutex/mutex.h +++ b/backends/mutex/mutex.h @@ -29,6 +29,10 @@ #include "common/system.h" #include "common/noncopyable.h" +/** + * Abstract class for mutex manager. Subclasses + * implement the real functionality. + */ class MutexManager : Common::NonCopyable { public: virtual ~MutexManager() {} @@ -39,5 +43,4 @@ public: virtual void deleteMutex(OSystem::MutexRef mutex) = 0; }; - #endif diff --git a/backends/mutex/null/null-mutex.h b/backends/mutex/null/null-mutex.h index ddfe23bdee..54b8f5ce96 100644 --- a/backends/mutex/null/null-mutex.h +++ b/backends/mutex/null/null-mutex.h @@ -28,12 +28,15 @@ #include "backends/mutex/mutex.h" +/** + * Null mutex manager + */ 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) {} + virtual OSystem::MutexRef createMutex() { return OSystem::MutexRef(); } + virtual void lockMutex(OSystem::MutexRef mutex) {} + virtual void unlockMutex(OSystem::MutexRef mutex) {} + virtual void deleteMutex(OSystem::MutexRef mutex) {} }; #endif diff --git a/backends/mutex/sdl/sdl-mutex.h b/backends/mutex/sdl/sdl-mutex.h index a929ea495f..88a19d398a 100644 --- a/backends/mutex/sdl/sdl-mutex.h +++ b/backends/mutex/sdl/sdl-mutex.h @@ -28,12 +28,15 @@ #include "backends/mutex/mutex.h" +/** + * SDL mutex manager + */ class SdlMutexManager : public MutexManager { public: - OSystem::MutexRef createMutex(); - void lockMutex(OSystem::MutexRef mutex); - void unlockMutex(OSystem::MutexRef mutex); - void deleteMutex(OSystem::MutexRef mutex); + virtual OSystem::MutexRef createMutex(); + virtual void lockMutex(OSystem::MutexRef mutex); + virtual void unlockMutex(OSystem::MutexRef mutex); + virtual void deleteMutex(OSystem::MutexRef mutex); }; |