threadpool.patch 1.28 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
From 1da6fe09a3387d31c111e5d26c98653e39bf1d46 Mon Sep 17 00:00:00 2001
From: Eden Abitbol <eden.abitbol@savoirfairelinux.com>
Date: Mon, 3 Jun 2019 17:48:04 -0400
Subject: [PATCH] threadpool patch

---
 upnp/src/threadutil/ThreadPool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/upnp/src/threadutil/ThreadPool.c b/upnp/src/threadutil/ThreadPool.c
index 2441d38..6de4d3d 100644
--- a/upnp/src/threadutil/ThreadPool.c
+++ b/upnp/src/threadutil/ThreadPool.c
@@ -264,7 +264,7 @@ static int SetPolicyType(
 	setpriority(PRIO_PROCESS, 0, 0);
 	retVal = 0;
 #elif defined(_WIN32)
18
-	retVal = sched_setscheduler(0, in);
19
+	retVal = 0
20
 #elif defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING > 0
21 22 23
 	struct sched_param current;
 	int sched_result;
@@ -416,7 +416,7 @@ static void SetSeed(void)
24

25 26
 	gettimeofday(&t, NULL);
 #if defined(_WIN32)
27 28 29
-	srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id().p);
+	srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id());
 #elif defined(BSD) || defined(__OSX__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
30
 	srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id());
31
 #elif defined(__linux__) || defined(__sun) || defined(__CYGWIN__) || defined(__GLIBC__)
32 33 34
--
2.17.1