aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-06-10 23:10:30 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-06-10 23:10:30 +0000
commitf93d5f9ffe1e12079e560a735111735924726a06 (patch)
tree0a34330f01acf1a2cd18f5a9f8c36ec29216a3e8 /util.h
parent2ca17588327858947590fda78d68cfad79e633bc (diff)
downloadbitcoin-f93d5f9ffe1e12079e560a735111735924726a06.tar.xz
automatically change displayed address whenever it receives anything,v0.2.10
added help and -? for daemon command line rpc commands, only relay addr messages to 5 random nodes to save bandwidth, started setting wtx.fFromMe flag, trickle out tx inventory messages to protect privacy -- version 0.2.10 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@81 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'util.h')
-rw-r--r--util.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/util.h b/util.h
index 1a25c7ddcc..40d46bc174 100644
--- a/util.h
+++ b/util.h
@@ -520,8 +520,13 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa
inline void SetThreadPriority(int nPriority)
{
- // threads are processes on linux, so PRIO_PROCESS affects just the one thread
- setpriority(PRIO_PROCESS, getpid(), nPriority);
+ // It's unclear if it's even possible to change thread priorities on Linux,
+ // but we really and truly need it for the generation threads.
+#ifdef PRIO_THREAD
+ setpriority(PRIO_THREAD, 0, nPriority);
+#else
+ setpriority(PRIO_PROCESS, 0, nPriority);
+#endif
}
inline bool TerminateThread(pthread_t hthread, unsigned int nExitCode)