Nick Mathewson
ac5b70c700
handle EINTR in compat_*threads.c
2015-01-21 12:18:11 -05:00
Nick Mathewson
a52e549124
Update workqueue implementation to use a single queue for the work
...
Previously I used one queue per worker; now I use one queue for
everyone. The "broadcast" code is gone, replaced with an idempotent
'update' operation.
2015-01-15 11:05:22 -05:00
Nick Mathewson
cc6529e9bb
Fix check-spaces
2015-01-14 11:19:35 -05:00
Nick Mathewson
e47a90a976
"Recursive" locks, not "reentrant" locks. Duh.
2015-01-14 11:12:40 -05:00
Nick Mathewson
d69717f61b
Use correct (absolute) time for pthread_cond_timedwait
2015-01-14 11:09:52 -05:00
Nick Mathewson
3868b5d210
Rename mutex_for_cond -> mutex_nonreentrant
...
We'll want to use these for other stuff too.
2015-01-14 11:05:56 -05:00
Nick Mathewson
b2db3fb462
Documentation for new workqueue and condition and locking stuff
2015-01-14 11:05:54 -05:00
Nick Mathewson
6c9363310a
Specialize handling for mutexes allocated for condition variables
...
(These must not be reentrant mutexes with pthreads.)
2015-01-14 10:52:56 -05:00
Nick Mathewson
65016304d2
Add tor_cond_init/uninit
2015-01-14 10:49:59 -05:00
Nick Mathewson
e865248156
Add a timeout to tor_cond_wait; add tor_cond impl from libevent
...
The windows code may need some tweaks for it to compile; I've not
tested it yet.
2015-01-14 10:47:39 -05:00
Nick Mathewson
c2f0d52b7f
Split threading-related code out of compat.c
...
Also, re-enable the #if'd out condition-variable code.
Work queues are going to make us hack on all of this stuff a bit more
closely, so it might not be a terrible idea to make it easier to hack.
2015-01-14 10:41:53 -05:00