1 /* Copyright (c) 2001 Matej Pfajfar.
2 * Copyright (c) 2001-2004, Roger Dingledine.
3 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4 * Copyright (c) 2007-2017, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
9 * \brief Header file for cpuworker.c.
12 #ifndef TOR_CPUWORKER_H
13 #define TOR_CPUWORKER_H
16 void cpuworkers_rotate_keyinfo(void);
17 struct workqueue_entry_s
;
18 enum workqueue_reply_t
;
19 enum workqueue_priority_t
;
20 MOCK_DECL(struct workqueue_entry_s
*, cpuworker_queue_work
, (
21 enum workqueue_priority_t priority
,
22 enum workqueue_reply_t (*fn
)(void *, void *),
23 void (*reply_fn
)(void *),
27 int assign_onionskin_to_cpuworker(or_circuit_t
*circ
,
28 struct create_cell_t
*onionskin
);
30 uint64_t estimated_usec_for_onionskins(uint32_t n_requests
,
31 uint16_t onionskin_type
);
32 void cpuworker_log_onionskin_overhead(int severity
, int onionskin_type
,
33 const char *onionskin_type_name
);
34 void cpuworker_cancel_circ_handshake(or_circuit_t
*circ
);
36 #endif /* !defined(TOR_CPUWORKER_H) */