diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-06 15:51:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-15 11:21:33 -0400 |
commit | b022ea32a685e4163595b5a3ded0bc00bb378896 (patch) | |
tree | 8764e6a886f29123b9011bc5248ff2d61e13cfff /src/or/cpuworker.c | |
parent | 222122450c1e879989c440088c01eaa95e4d6980 (diff) | |
download | tor-b022ea32a685e4163595b5a3ded0bc00bb378896.tar.gz tor-b022ea32a685e4163595b5a3ded0bc00bb378896.zip |
Expand cpuworker API to allow other work types
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r-- | src/or/cpuworker.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index 790c147d7b..f79cd067cb 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -479,6 +479,20 @@ queue_pending_tasks(void) } } +/** DOCDOC */ +workqueue_entry_t * +cpuworker_queue_work(workqueue_reply_t (*fn)(void *, void *), + void (*reply_fn)(void *), + void *arg) +{ + tor_assert(threadpool); + + return threadpool_queue_work(threadpool, + fn, + reply_fn, + arg); +} + /** Try to tell a cpuworker to perform the public key operations necessary to * respond to <b>onionskin</b> for the circuit <b>circ</b>. * |