mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Make cpuworker_queue_work function mockable.
I'll be using this in the unit tests for consdiffmgr.
This commit is contained in:
parent
bc91808c47
commit
fe584f4012
@ -480,10 +480,10 @@ queue_pending_tasks(void)
|
||||
}
|
||||
|
||||
/** DOCDOC */
|
||||
workqueue_entry_t *
|
||||
cpuworker_queue_work(workqueue_reply_t (*fn)(void *, void *),
|
||||
void (*reply_fn)(void *),
|
||||
void *arg)
|
||||
MOCK_IMPL(workqueue_entry_t *,
|
||||
cpuworker_queue_work,(workqueue_reply_t (*fn)(void *, void *),
|
||||
void (*reply_fn)(void *),
|
||||
void *arg))
|
||||
{
|
||||
tor_assert(threadpool);
|
||||
|
||||
|
@ -16,10 +16,10 @@ void cpu_init(void);
|
||||
void cpuworkers_rotate_keyinfo(void);
|
||||
struct workqueue_entry_s;
|
||||
enum workqueue_reply_t;
|
||||
struct workqueue_entry_s *cpuworker_queue_work(
|
||||
MOCK_DECL(struct workqueue_entry_s *, cpuworker_queue_work, (
|
||||
enum workqueue_reply_t (*fn)(void *, void *),
|
||||
void (*reply_fn)(void *),
|
||||
void *arg);
|
||||
void *arg));
|
||||
|
||||
struct create_cell_t;
|
||||
int assign_onionskin_to_cpuworker(or_circuit_t *circ,
|
||||
|
Loading…
Reference in New Issue
Block a user