aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-02-07 19:42:29 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2012-02-16 12:43:06 +0100
commitc59881eaee61ae7d3b16001a75b9fd9fd09af297 (patch)
treed2647c529d3798fdfe794df6c5add91312fef092 /src/net.h
parent999b4cacaf53189dc9e8d5c6373c1f3da5b8ae4c (diff)
Symbolic names for threads
Introduce an enum threadId, and use symbolic indices when accessing vnThreadsRunning.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/net.h b/src/net.h
index a66bc15438..0a3cf388ec 100644
--- a/src/net.h
+++ b/src/net.h
@@ -68,14 +68,26 @@ public:
-
+enum threadId
+{
+ THREAD_SOCKETHANDLER,
+ THREAD_OPENCONNECTIONS,
+ THREAD_MESSAGEHANDLER,
+ THREAD_MINER,
+ THREAD_RPCSERVER,
+ THREAD_UPNP,
+ THREAD_DNSSEED,
+ THREAD_ADDEDCONNECTIONS,
+
+ THREAD_MAX
+};
extern bool fClient;
extern bool fAllowDNS;
extern uint64 nLocalServices;
extern CAddress addrLocalHost;
extern uint64 nLocalHostNonce;
-extern boost::array<int, 10> vnThreadsRunning;
+extern boost::array<int, THREAD_MAX> vnThreadsRunning;
extern std::vector<CNode*> vNodes;
extern CCriticalSection cs_vNodes;