tor  0.4.0.1-alpha
cpuworker.h
Go to the documentation of this file.
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-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
12 #ifndef TOR_CPUWORKER_H
13 #define TOR_CPUWORKER_H
14 
15 void cpu_init(void);
16 void cpuworkers_rotate_keyinfo(void);
17 struct workqueue_entry_s;
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 *),
24  void *arg));
25 
26 struct create_cell_t;
28  struct create_cell_t *onionskin);
29 
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);
35 
36 #endif /* !defined(TOR_CPUWORKER_H) */
37 
int assign_onionskin_to_cpuworker(or_circuit_t *circ, struct create_cell_t *onionskin)
Definition: cpuworker.c:516
uint8_t onionskin[CELL_PAYLOAD_SIZE - 4]
Definition: onion.h:32
void cpu_init(void)
Definition: cpuworker.c:86
workqueue_reply_t
Definition: workqueue.h:24
workqueue_priority_t
Definition: workqueue.h:31
uint64_t estimated_usec_for_onionskins(uint32_t n_requests, uint16_t onionskin_type)
Definition: cpuworker.c:247
void cpuworker_log_onionskin_overhead(int severity, int onionskin_type, const char *onionskin_type_name)
Definition: cpuworker.c:295
void cpuworkers_rotate_keyinfo(void)
Definition: cpuworker.c:192
void cpuworker_cancel_circ_handshake(or_circuit_t *circ)
Definition: cpuworker.c:584
Definition: workqueue.c:98
#define MOCK_DECL(rv, funcname, arglist)
Definition: testsupport.h:94