2010-07-22 11:40:39 +02:00
|
|
|
/* Copyright (c) 2001 Matej Pfajfar.
|
|
|
|
* Copyright (c) 2001-2004, Roger Dingledine.
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
2017-03-15 21:13:17 +01:00
|
|
|
* Copyright (c) 2007-2017, The Tor Project, Inc. */
|
2010-07-22 11:40:39 +02:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file cpuworker.h
|
|
|
|
* \brief Header file for cpuworker.c.
|
|
|
|
**/
|
|
|
|
|
2012-10-12 18:13:10 +02:00
|
|
|
#ifndef TOR_CPUWORKER_H
|
|
|
|
#define TOR_CPUWORKER_H
|
2010-07-22 11:40:39 +02:00
|
|
|
|
|
|
|
void cpu_init(void);
|
2013-10-02 18:32:09 +02:00
|
|
|
void cpuworkers_rotate_keyinfo(void);
|
2017-04-06 21:51:52 +02:00
|
|
|
struct workqueue_entry_s;
|
|
|
|
enum workqueue_reply_t;
|
2017-04-15 01:23:21 +02:00
|
|
|
MOCK_DECL(struct workqueue_entry_s *, cpuworker_queue_work, (
|
2017-04-06 21:51:52 +02:00
|
|
|
enum workqueue_reply_t (*fn)(void *, void *),
|
|
|
|
void (*reply_fn)(void *),
|
2017-04-15 01:23:21 +02:00
|
|
|
void *arg));
|
2013-10-02 18:32:09 +02:00
|
|
|
|
2012-12-06 04:34:49 +01:00
|
|
|
struct create_cell_t;
|
2013-10-02 18:32:09 +02:00
|
|
|
int assign_onionskin_to_cpuworker(or_circuit_t *circ,
|
2012-12-06 04:34:49 +01:00
|
|
|
struct create_cell_t *onionskin);
|
2010-07-22 11:40:39 +02:00
|
|
|
|
2012-12-27 00:08:01 +01:00
|
|
|
uint64_t estimated_usec_for_onionskins(uint32_t n_requests,
|
|
|
|
uint16_t onionskin_type);
|
2013-01-03 19:20:20 +01:00
|
|
|
void cpuworker_log_onionskin_overhead(int severity, int onionskin_type,
|
|
|
|
const char *onionskin_type_name);
|
2013-10-02 18:32:09 +02:00
|
|
|
void cpuworker_cancel_circ_handshake(or_circuit_t *circ);
|
2012-12-27 00:08:01 +01:00
|
|
|
|
2010-07-22 11:40:39 +02:00
|
|
|
#endif
|
|
|
|
|