Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Sierra provides clock_gettime(), but not pthread_condattr_setclock.
So we had better lot try to use CLOCK_MONOTONIC as our source for
time when waiting, since we ccan never actually tell the condition
that we mean CLOCK_MONOTONIC.
This isn't a tor bug yet, since we never actually pass a timeout to
tor_cond_wait() outside of the unit tests.
|
|
|
|
|
|
The Autoconf macro AC_USE_SYSTEM_EXTENSIONS defines preprocessor macros
which turn on extensions to C and POSIX. The macro also makes it easier
for developers to use the extensions without needing (or forgetting) to
define them manually.
The macro can be safely used because it was introduced in Autoconf 2.60
and Tor requires Autoconf 2.63 and above.
|
|
These are all related to failures from functions that either can't
fail as we call them, or where we cannot provoke failure.
|
|
|
|
|
|
Fixes bug 17819; bugfix on 0.2.6.3-alpha (specifically, d684dbb0).
|
|
|
|
|
|
spawn_func calls pthread_create on unix, not fork
Fix on existing code split out of compat.c into
compat_pthreads.c in c2f0d52b7fb9
|
|
|
|
Fixes part of bug 15211.
|
|
When calling pthread_attr_setdetachstate, we were using 1 as the
argument. But the pthreads documentation says that you have to say
PTHREAD_CREATE_DETACH, which on Solaris is apparently 0x40. Calling
pthread_attr_setdetachstate with 1 crashes on Solaris with FLTBOUNDS.
(Because we're so late in the release cycle, I made the code define
PTHREAD_CREATE_DETACHED if it doesn't exist, so we aren't likely to
break any other platforms.)
This bug was introduced when we made threading mandatory in
0.2.6.1-alpha; previously, we had force-disabled threading on
Solaris. See #9495 discussion.
|
|
|
|
This is to avoid that the pthread_cond_timedwait() is not affected by time
adjustment which could make the waiting period very long or very short which
is not what we want in any cases.
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
We'll want to use these for other stuff too.
|
|
|
|
(These must not be reentrant mutexes with pthreads.)
|
|
|
|
The windows code may need some tweaks for it to compile; I've not
tested it yet.
|
|
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.
|