aboutsummaryrefslogtreecommitdiff
path: root/src/common/workqueue.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-09-24 20:55:09 -0400
committerNick Mathewson <nickm@torproject.org>2015-01-14 11:01:21 -0500
commit4abbf13f99dac9e15856dc4e458a8c9525acab4d (patch)
treef89e4f15a04857ffc9bc5cc0742c30caa2e5e46a /src/common/workqueue.h
parent51bc0e7f3d612b099382500b434d31f179eaa8a8 (diff)
downloadtor-4abbf13f99dac9e15856dc4e458a8c9525acab4d.tar.gz
tor-4abbf13f99dac9e15856dc4e458a8c9525acab4d.zip
Add a way to tell all threads to do something.
Diffstat (limited to 'src/common/workqueue.h')
-rw-r--r--src/common/workqueue.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/workqueue.h b/src/common/workqueue.h
index 47753cff12..684fb192ba 100644
--- a/src/common/workqueue.h
+++ b/src/common/workqueue.h
@@ -21,8 +21,12 @@ workqueue_entry_t *threadpool_queue_work(threadpool_t *pool,
int (*fn)(void *, void *),
void (*reply_fn)(void *),
void *arg);
+int threadpool_queue_for_all(threadpool_t *pool,
+ void *(*dup_fn)(void *),
+ int (*fn)(void *, void *),
+ void (*reply_fn)(void *),
+ void *arg);
int workqueue_entry_cancel(workqueue_entry_t *pending_work);
-int threadpool_start_threads(threadpool_t *pool, int n);
threadpool_t *threadpool_new(int n_threads,
replyqueue_t *replyqueue,
void *(*new_thread_state_fn)(void*),