diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-07-27 16:29:34 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-07-27 16:29:34 -0400 |
commit | ba334c00da539a78fdfca696d4b53224e9354a6a (patch) | |
tree | 606a1183e4a256a2416ef9a5691c305e38048911 /src/test | |
parent | ced2dd5f92c910fb827bac2e70edfc6e5922b21a (diff) | |
parent | fdd8156ea3da9548b99ab95d72e3193ae9de3feb (diff) | |
download | tor-ba334c00da539a78fdfca696d4b53224e9354a6a.tar.gz tor-ba334c00da539a78fdfca696d4b53224e9354a6a.zip |
Merge branch 'multi-priority_squashed' into maint-0.3.1
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_consdiffmgr.c | 5 | ||||
-rw-r--r-- | src/test/test_workqueue.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/test/test_consdiffmgr.c b/src/test/test_consdiffmgr.c index 746d17a038..963a6e427a 100644 --- a/src/test/test_consdiffmgr.c +++ b/src/test/test_consdiffmgr.c @@ -98,10 +98,13 @@ typedef struct fake_work_queue_ent_t { void *arg; } fake_work_queue_ent_t; static struct workqueue_entry_s * -mock_cpuworker_queue_work(enum workqueue_reply_t (*fn)(void *, void *), +mock_cpuworker_queue_work(workqueue_priority_t prio, + enum workqueue_reply_t (*fn)(void *, void *), void (*reply_fn)(void *), void *arg) { + (void) prio; + if (! fake_cpuworker_queue) fake_cpuworker_queue = smartlist_new(); diff --git a/src/test/test_workqueue.c b/src/test/test_workqueue.c index 10714457f7..6fa46f90d4 100644 --- a/src/test/test_workqueue.c +++ b/src/test/test_workqueue.c @@ -200,7 +200,9 @@ add_work(threadpool_t *tp) crypto_rand((char*)w->msg, 20); w->msglen = 20; ++rsa_sent; - return threadpool_queue_work(tp, workqueue_do_rsa, handle_reply, w); + return threadpool_queue_work_priority(tp, + WQ_PRI_MED, + workqueue_do_rsa, handle_reply, w); } else { ecdh_work_t *w = tor_malloc_zero(sizeof(*w)); w->serial = n_sent++; |