[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [tor/master 19/40] Create cpuworker.h
Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date: Thu, 22 Jul 2010 11:40:39 +0200
Subject: Create cpuworker.h
Commit: 98d1314c7eb1ef13e298703fa50f0b6b62c35bd3
---
src/or/command.c | 1 +
src/or/config.c | 1 +
src/or/connection.c | 1 +
src/or/cpuworker.h | 25 +++++++++++++++++++++++++
src/or/main.c | 1 +
src/or/or.h | 11 -----------
6 files changed, 29 insertions(+), 11 deletions(-)
create mode 100644 src/or/cpuworker.h
diff --git a/src/or/command.c b/src/or/command.c
index e0fedbd..771dcc4 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -23,6 +23,7 @@
#include "connection_or.h"
#include "config.h"
#include "control.h"
+#include "cpuworker.h"
#include "router.h"
#include "routerlist.h"
diff --git a/src/or/config.c b/src/or/config.c
index 2a1f282..3f18984 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -18,6 +18,7 @@
#include "connection.h"
#include "connection_edge.h"
#include "control.h"
+#include "cpuworker.h"
#include "geoip.h"
#include "rendclient.h"
#include "rendservice.h"
diff --git a/src/or/connection.c b/src/or/connection.c
index ae81ae0..ac8123c 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -20,6 +20,7 @@
#include "connection_edge.h"
#include "connection_or.h"
#include "control.h"
+#include "cpuworker.h"
#include "dnsserv.h"
#include "geoip.h"
#include "rendclient.h"
diff --git a/src/or/cpuworker.h b/src/or/cpuworker.h
new file mode 100644
index 0000000..e09703f
--- /dev/null
+++ b/src/or/cpuworker.h
@@ -0,0 +1,25 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2010, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file cpuworker.h
+ * \brief Header file for cpuworker.c.
+ **/
+
+#ifndef _TOR_CPUWORKER_H
+#define _TOR_CPUWORKER_H
+
+void cpu_init(void);
+void cpuworkers_rotate(void);
+int connection_cpu_finished_flushing(connection_t *conn);
+int connection_cpu_reached_eof(connection_t *conn);
+int connection_cpu_process_inbuf(connection_t *conn);
+int assign_onionskin_to_cpuworker(connection_t *cpuworker,
+ or_circuit_t *circ,
+ char *onionskin);
+
+#endif
+
diff --git a/src/or/main.c b/src/or/main.c
index 6384863..46ab044 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -22,6 +22,7 @@
#include "connection_edge.h"
#include "connection_or.h"
#include "control.h"
+#include "cpuworker.h"
#include "dnsserv.h"
#include "geoip.h"
#include "rendclient.h"
diff --git a/src/or/or.h b/src/or/or.h
index 91509ea..f38567f 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -3164,17 +3164,6 @@ typedef enum {
BOOTSTRAP_STATUS_DONE=100
} bootstrap_status_t;
-/********************************* cpuworker.c *****************************/
-
-void cpu_init(void);
-void cpuworkers_rotate(void);
-int connection_cpu_finished_flushing(connection_t *conn);
-int connection_cpu_reached_eof(connection_t *conn);
-int connection_cpu_process_inbuf(connection_t *conn);
-int assign_onionskin_to_cpuworker(connection_t *cpuworker,
- or_circuit_t *circ,
- char *onionskin);
-
/********************************* directory.c ***************************/
int directories_have_accepted_server_descriptor(void);
--
1.7.1