Age | Commit message (Collapse) | Author |
|
This commit adds or improves the module-level documenation for:
buffers.c circuitstats.c command.c connection_edge.c control.c
cpuworker.c crypto_curve25519.c crypto_curve25519.h
crypto_ed25519.c crypto_format.c dircollate.c dirserv.c dns.c
dns_structs.h fp_pair.c geoip.c hibernate.c keypin.c ntmain.c
onion.c onion_fast.c onion_ntor.c onion_tap.c periodic.c
protover.c protover.h reasons.c rephist.c replaycache.c
routerlist.c routerparse.c routerset.c statefile.c status.c
tor_main.c workqueue.c
In particular, I've tried to explain (for each documented module)
what each module does, what's in it, what the big idea is, why it
belongs in Tor, and who calls it. In a few cases, I've added TODO
notes about refactoring opportunities.
I've also renamed an argument, and fixed a few DOCDOC comments.
|
|
These are all related to failures from functions that either can't
fail as we call them, or where we cannot provoke failure.
|
|
|
|
This includes a small refactoring to use a new enum (workqueue_reply_t)
for the return values instead of just ints.
|
|
|
|
(even though these are nonblocking calls and EINTR shouldn't be possible).
Also, log what error we're seing if drain_fn fails.
|
|
According to POSIX, the mutex must be locked by the thread calling the signal
functions to ensure predictable scheduling behavior.
Found the issue using Helgrind which gave the warning `dubious: associated lock
is not held by any thread`.
|
|
|
|
Found by Coverity; Fixes CID 1268069
|
|
CID 1268069
|
|
Also remove the unit test mocks that allowed get_options() to be
NULL; that's an invariant violation for get_options().
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
It seems to be working, but more tuning is needed.
|