Quantum-erase GraphicsLock; Some changes needed to accomplish this:
* comm/trackplayer Callbacks are now queued instead of asynchronously called on the stream decoder thread * libs/callback now guards the list with a mutex (called from different threads) * only one thread (Starcon2Main) is allowed to queue draw commands right now; a sanity check is in place (define DEBUG_DCQ_THREADS) Fixes: Alarms and Callbacks are used for more than just Netplay, reflect this. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3761 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -97,10 +97,7 @@ The simplest form of lock. If a thread tries to lock a mutex, it will
|
||||
sleep if the mutex is already locked, and awaken once the mutex
|
||||
becomes available. A Mutex must be unlocked by the same thread that
|
||||
locked it, and a thread must never lock a mutex it has already locked
|
||||
(without unlocking it first). The most important Mutex in the program
|
||||
the GraphicsLock. Code in UQM that does things like change the
|
||||
screen's clipping rectangle always grabs the GraphicsLock first, to
|
||||
ensure that the screen doesn't go crazy.
|
||||
(without unlocking it first).
|
||||
|
||||
API:
|
||||
Mutex CreateMutex (const char *name, DWORD syncClass);
|
||||
|
||||
Reference in New Issue
Block a user