diff options
| author | Max Horn | 2007-12-22 13:16:01 +0000 | 
|---|---|---|
| committer | Max Horn | 2007-12-22 13:16:01 +0000 | 
| commit | 019ad448223a0dc881737e5f7766142c3862765f (patch) | |
| tree | 5a2b8968d927f8c4be2bae989096b5518383486b | |
| parent | f00ebbf8d908b6865c67edcd59eba55d99d223b0 (diff) | |
| download | scummvm-rg350-019ad448223a0dc881737e5f7766142c3862765f.tar.gz scummvm-rg350-019ad448223a0dc881737e5f7766142c3862765f.tar.bz2 scummvm-rg350-019ad448223a0dc881737e5f7766142c3862765f.zip | |
Document that we expect recursive mutex locking behavior
svn-id: r29952
| -rw-r--r-- | common/system.h | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/common/system.h b/common/system.h index a55bc2b543..7246389bab 100644 --- a/common/system.h +++ b/common/system.h @@ -750,6 +750,8 @@ public:  	 * But since those may be implemented using threads (and in fact, that's  	 * how our primary backend, the SDL one, does it on many systems), we  	 * still have to do mutex syncing in our timer callbacks. +	 * In addition, the sound mixer uses a mutex in case the backend runs it +	 * from a dedicated thread (as e.g. the SDL backend does).  	 *  	 * Hence backends which do not use threads to implement the timers simply  	 * can use dummy implementations for these methods. @@ -766,6 +768,12 @@ public:  	/**  	 * Lock the given mutex. +	 * +	 * @note ScummVM code assumes that the mutex implementation supports +	 * recursive locking. That is, a thread may lock a mutex twice w/o +	 * deadlocking. In case of a multilock, the mutex has to be unlocked +	 * as many times as it was locked befored it really becomes unlocked. +	 *  	 * @param mutex	the mutex to lock.  	 */  	virtual void lockMutex(MutexRef mutex) = 0; | 
