Nick Mathewson
3d9952a3b1
Improve threadlocal documentation
2015-08-18 08:56:24 -04:00
Nick Mathewson
e8fe77530a
Add comments for thread-local storage functions
2015-08-18 08:56:23 -04:00
Nick Mathewson
9ec94f1d22
Use thread-local storage to block event_queue recursion.
2015-08-18 08:56:23 -04: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
c51f7c23e3
Test a little more of compat_threads.c
2015-01-14 11:05:56 -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
51bc0e7f3d
Isolate the "socketpair or a pipe" logic for alerting main thread
...
This way we can use the linux eventfd extension where available.
Using EVFILT_USER on the BSDs will be a teeny bit trickier, and will
require libevent hacking.
2015-01-14 11:01:19 -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