Nick Mathewson
4a6b43bf76
fix some warnings in compat_threads.c
2015-01-22 14:22:39 -05:00
Nick Mathewson
1fb9979eb8
Move a redundant _GNU_SOURCE to where it is not redundant
2015-01-22 14:18:10 -05:00
Nick Mathewson
ac5b70c700
handle EINTR in compat_*threads.c
2015-01-21 12:18:11 -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
d850ec8574
Fix linux compilation (pipe2 needs _GNU_SOURCE)
2015-01-14 11:09:51 -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
65016304d2
Add tor_cond_init/uninit
2015-01-14 10:49:59 -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