mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +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 */
|
/** DOCDOC */
|
||||||
workqueue_entry_t *
|
MOCK_IMPL(workqueue_entry_t *,
|
||||||
cpuworker_queue_work(workqueue_reply_t (*fn)(void *, void *),
|
cpuworker_queue_work,(workqueue_reply_t (*fn)(void *, void *),
|
||||||
void (*reply_fn)(void *),
|
void (*reply_fn)(void *),
|
||||||
void *arg)
|
void *arg))
|
||||||
{
|
{
|
||||||
tor_assert(threadpool);
|
tor_assert(threadpool);
|
||||||
|
|
||||||
|
@ -16,10 +16,10 @@ void cpu_init(void);
|
|||||||
void cpuworkers_rotate_keyinfo(void);
|
void cpuworkers_rotate_keyinfo(void);
|
||||||
struct workqueue_entry_s;
|
struct workqueue_entry_s;
|
||||||
enum workqueue_reply_t;
|
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 *),
|
enum workqueue_reply_t (*fn)(void *, void *),
|
||||||
void (*reply_fn)(void *),
|
void (*reply_fn)(void *),
|
||||||
void *arg);
|
void *arg));
|
||||||
|
|
||||||
struct create_cell_t;
|
struct create_cell_t;
|
||||||
int assign_onionskin_to_cpuworker(or_circuit_t *circ,
|
int assign_onionskin_to_cpuworker(or_circuit_t *circ,
|
||||||
|
Loading…
Reference in New Issue
Block a user