Glenn Maynard
46f414e7e5
Fix race condition.
...
Work around undocumented SignalObjectAndWait behavior; the docs
refer to "the object", but the function takes two objects. (Cut and paste
documentation ...)
2005-01-29 20:25:52 +00:00
Glenn Maynard
8bf00eb4e8
implement event wait timeouts in win32
2005-01-27 01:54:33 +00:00
Glenn Maynard
903aaadcc5
After signalling an event, always wait for the signalled thread to touch
...
m_WaitersDone. This fixes problems with
event.Lock();
event.Signal();
while(x) event.Wait();
picking up the signal that it just sent (which is wrong), especially in the
debugger.
2005-01-27 01:19:24 +00:00
Glenn Maynard
1b49d06b5d
oops
2005-01-26 21:41:40 +00:00
Glenn Maynard
08ddf9af77
fix up EventImpl_Pthreads::Wait
2005-01-26 21:13:50 +00:00
Glenn Maynard
63604a6536
implement RageEvent::Wait timeouts
2005-01-26 20:59:41 +00:00
Glenn Maynard
0330fa9e87
untested pthreads event implementation
2004-11-07 22:56:03 +00:00
Glenn Maynard
4de15ff3a7
untested thread events implementation for win32
2004-11-07 22:43:39 +00:00
Chris Danford
79beff5e26
revert timeout length
2004-10-09 16:56:29 +00:00
Chris Danford
47e2e2d48d
increase mutex timeout
2004-10-09 09:00:24 +00:00
Glenn Maynard
00b2d18a8e
show thread names in the VC debugger
2004-09-17 02:36:04 +00:00
Glenn Maynard
fefe7bad49
fix thread handles on win9x
2004-09-14 04:39:52 +00:00
Glenn Maynard
34f22e588c
fix up SemaImpl_Pthreads::Wait
2004-09-08 21:58:47 +00:00
Glenn Maynard
3e7f55ae30
no, don't use pthreads extensions if we don't at least have timedlock (not going to bother making it two tests unless it's actually needed)
2004-09-08 08:56:19 +00:00
Steve Checkoway
bf3ce581af
OS X has pthread_cond_timedwait but not pthread_mutex_timedlock.
2004-09-08 08:36:43 +00:00
Glenn Maynard
2625da14f2
cleanup
...
support semaphore timeouts
2004-09-08 07:56:32 +00:00
Glenn Maynard
81f2f6460a
hopefully fix init order in vc6
2004-09-08 06:33:07 +00:00
Steve Checkoway
bdd4988829
Simplify.
2004-09-07 12:49:49 +00:00
Steve Checkoway
8adbeda32a
Use DarwinThreadHelpers, remove mach stuff.
2004-09-07 12:38:10 +00:00
Glenn Maynard
9cf85e4b84
remove comment
2004-09-07 04:24:26 +00:00
Glenn Maynard
7f805dcc87
simplify
2004-09-07 03:26:23 +00:00
Glenn Maynard
3f615baa8d
remove ugly ThreadImpl::GetCrashHandle
2004-09-07 03:05:56 +00:00
Glenn Maynard
3bf79d0bc4
track HANDLE separately
2004-09-07 02:55:41 +00:00
Glenn Maynard
5403b135b7
use RunningUnderValgrind()
2004-09-06 08:32:25 +00:00
Chris Danford
9d011d3489
increase number of retries to avoid timeout while debugging
2004-08-22 15:03:05 +00:00
Glenn Maynard
d176c8af17
avoid pthread_mutex_timedlock in valgrind
2004-08-22 01:31:12 +00:00
Chris Danford
d47ab7e9f9
wait 60s max in debug builds, 15s max in optimized
2004-08-08 15:46:53 +00:00
Chris Danford
d755e660a6
Don't timeout on a Wait() if a dialog is showing. The movie decode semaphone would timeout on most dialogs.
...
Increase Win32 semaphone timeout from 15 -> 60 secs.
2004-08-07 21:38:54 +00:00
Glenn Maynard
902182ae8d
fix RageThread::HaltAllThreads() deadlock in Windows
2004-06-25 19:07:30 +00:00
Chris Danford
6bd2a34271
Xbox builds again
2004-06-20 01:35:25 +00:00
Glenn Maynard
2ec6b55568
try using conditions for semaphores; standard semaphores are apparently too hard for OSX
2004-06-16 04:23:50 +00:00
Glenn Maynard
78411846e0
simplify; use SemaImpl_Pthreads instead of using low-level semaphores in two places
2004-06-16 03:13:11 +00:00
Glenn Maynard
075bc0ff9a
compile fix
2004-06-16 03:08:21 +00:00
Glenn Maynard
f6876a8f12
set piThreadID
2004-06-16 03:07:28 +00:00
Glenn Maynard
f5a35af702
use errno
2004-06-16 02:20:14 +00:00
Glenn Maynard
7821347dee
use errno
2004-06-16 02:18:56 +00:00
Glenn Maynard
994c367deb
don't throw in thread setup
2004-06-16 02:17:20 +00:00
Glenn Maynard
76f41546e2
fix various races
2004-06-16 01:53:27 +00:00
Glenn Maynard
1f0ac3792d
#include <pthread.h>, just in case
2004-06-14 05:28:30 +00:00
Glenn Maynard
003ba7cb63
fix compile
2004-06-14 05:25:25 +00:00
Glenn Maynard
cf9d31917f
add TryLock
...
add semaphores
2004-06-14 05:21:46 +00:00
Glenn Maynard
4c14fb3943
simplify (handle recursive locking in RageMutex)
2004-06-11 19:08:56 +00:00
Steve Checkoway
59d82961b9
Fix compile.
2004-06-11 07:39:53 +00:00
Glenn Maynard
6ca1cc935c
implement Threads_Pthreads::GetCrashHandle
2004-06-11 07:06:48 +00:00
Glenn Maynard
e80b8885db
ThreadImpl_Pthreads compiles
2004-06-11 05:26:00 +00:00
Glenn Maynard
310c18d70c
break thread/mutex implementation stuff out of RageThreads
...
(not used yet)
2004-06-11 05:12:58 +00:00