diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-02-07 19:42:29 +0100 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-02-16 12:43:06 +0100 |
commit | c59881eaee61ae7d3b16001a75b9fd9fd09af297 (patch) | |
tree | d2647c529d3798fdfe794df6c5add91312fef092 /src/net.h | |
parent | 999b4cacaf53189dc9e8d5c6373c1f3da5b8ae4c (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.h | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -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; |