From b022ea32a685e4163595b5a3ded0bc00bb378896 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 6 Apr 2017 15:51:52 -0400 Subject: Expand cpuworker API to allow other work types --- src/or/cpuworker.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/or/cpuworker.c') 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 onionskin for the circuit circ. * -- cgit v1.2.3-54-g00ecf