cpuworker.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. /**
  7. * \file cpuworker.h
  8. * \brief Header file for cpuworker.c.
  9. **/
  10. #ifndef TOR_CPUWORKER_H
  11. #define TOR_CPUWORKER_H
  12. #include "lib/evloop/workqueue.h"
  13. void cpu_init(void);
  14. void cpu_shutdown(void);
  15. void cpuworkers_rotate_keyinfo(void);
  16. struct workqueue_entry_s;
  17. enum workqueue_reply_t;
  18. enum workqueue_priority_t;
  19. MOCK_DECL(struct workqueue_entry_s *, cpuworker_queue_work, (
  20. enum workqueue_priority_t priority,
  21. enum workqueue_reply_t (*fn)(void *, void *),
  22. void (*reply_fn)(void *, workqueue_reply_t),
  23. void *arg));
  24. struct create_cell_t;
  25. int assign_onionskin_to_cpuworker(or_circuit_t *circ,
  26. struct create_cell_t *onionskin);
  27. uint64_t estimated_usec_for_onionskins(uint32_t n_requests,
  28. uint16_t onionskin_type);
  29. void cpuworker_log_onionskin_overhead(int severity, int onionskin_type,
  30. const char *onionskin_type_name);
  31. void cpuworker_cancel_circ_handshake(or_circuit_t *circ);
  32. #endif /* !defined(TOR_CPUWORKER_H) */