Skip to content

Commit 65aecda

Browse files
committed
Merge #8011: don't run ThreadMessageHandler at lowered priority
e53e7c5 don't run ThreadMessageHandler at lowered priority (Kaz Wesley)
2 parents efee32f + e53e7c5 commit 65aecda

File tree

4 files changed

+0
-26
lines changed

4 files changed

+0
-26
lines changed

src/compat.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,6 @@ typedef u_int SOCKET;
7878
#define MSG_NOSIGNAL 0
7979
#endif
8080

81-
#ifndef WIN32
82-
// PRIO_MAX is not defined on Solaris
83-
#ifndef PRIO_MAX
84-
#define PRIO_MAX 20
85-
#endif
86-
#define THREAD_PRIORITY_LOWEST PRIO_MAX
87-
#define THREAD_PRIORITY_BELOW_NORMAL 2
88-
#define THREAD_PRIORITY_NORMAL 0
89-
#define THREAD_PRIORITY_ABOVE_NORMAL (-2)
90-
#endif
91-
9281
#if HAVE_DECL_STRNLEN == 0
9382
size_t strnlen( const char *start, size_t max_len);
9483
#endif // HAVE_DECL_STRNLEN

src/net.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,6 @@ void ThreadMessageHandler()
17291729
boost::mutex condition_mutex;
17301730
boost::unique_lock<boost::mutex> lock(condition_mutex);
17311731

1732-
SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
17331732
while (true)
17341733
{
17351734
vector<CNode*> vNodesCopy;

src/util.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -790,19 +790,6 @@ bool SetupNetworking()
790790
return true;
791791
}
792792

793-
void SetThreadPriority(int nPriority)
794-
{
795-
#ifdef WIN32
796-
SetThreadPriority(GetCurrentThread(), nPriority);
797-
#else // WIN32
798-
#ifdef PRIO_THREAD
799-
setpriority(PRIO_THREAD, 0, nPriority);
800-
#else // PRIO_THREAD
801-
setpriority(PRIO_PROCESS, 0, nPriority);
802-
#endif // PRIO_THREAD
803-
#endif // WIN32
804-
}
805-
806793
int GetNumCores()
807794
{
808795
#if BOOST_VERSION >= 105600

src/util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ std::string HelpMessageOpt(const std::string& option, const std::string& message
208208
*/
209209
int GetNumCores();
210210

211-
void SetThreadPriority(int nPriority);
212211
void RenameThread(const char* name);
213212

214213
/**

0 commit comments

Comments
 (0)