[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: better fix for #4884
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: better fix for #4884 avoiding the problematic detach and the ERSCH-issue |
Date: |
Sun, 12 Feb 2017 09:46:32 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new 648b65aa better fix for #4884 avoiding the problematic detach and the
ERSCH-issue
648b65aa is described below
commit 648b65aa6c62e040e13976a8a2323829339a1572
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Feb 12 09:46:22 2017 +0100
better fix for #4884 avoiding the problematic detach and the ERSCH-issue
---
src/testcurl/perf_get_concurrent.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/testcurl/perf_get_concurrent.c
b/src/testcurl/perf_get_concurrent.c
index d44f6574..2b519caa 100644
--- a/src/testcurl/perf_get_concurrent.c
+++ b/src/testcurl/perf_get_concurrent.c
@@ -75,6 +75,11 @@ static struct MHD_Response *response;
*/
static unsigned long long start_time;
+/**
+ * Set to 1 if the worker threads are done.
+ */
+static volatile int signal_done;
+
/**
* Get the current timestamp
@@ -132,6 +137,7 @@ copyBuffer (void *ptr,
return size * nmemb;
}
+
static int
ahc_echo (void *cls,
struct MHD_Connection *connection,
@@ -159,6 +165,7 @@ ahc_echo (void *cls,
return ret;
}
+
static void *
thread_gets (void *param)
{
@@ -198,6 +205,7 @@ thread_gets (void *param)
return NULL;
}
+
static void *
do_gets (void * param)
{
@@ -225,6 +233,7 @@ do_gets (void * param)
NULL != ret_val)
err = ret_val;
}
+ signal_done = 1;
return err;
}
@@ -285,6 +294,7 @@ testMultithreadedGet (int port, int poll_flag)
return 0;
}
+
static int
testMultithreadedPoolGet (int port, int poll_flag)
{
@@ -313,6 +323,7 @@ testMultithreadedPoolGet (int port, int poll_flag)
return 0;
}
+
static int
testExternalGet (int port)
{
@@ -332,19 +343,15 @@ testExternalGet (int port)
port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END);
if (d == NULL)
return 256;
- if (0 != pthread_create(&pid, NULL, &do_gets, (void*)(intptr_t)port))
+ if (0 != pthread_create (&pid, NULL,
+ &do_gets, (void*)(intptr_t)port))
{
MHD_stop_daemon(d);
return 512;
}
start_timer ();
- /* detach so that pthread_kill detection works on Solaris (#4884) */
- if (0 != pthread_detach(pid))
- {
- MHD_stop_daemon(d);
- return 512;
- }
- while (ESRCH != pthread_kill (pid, 0))
+
+ while (0 == signal_done)
{
max = 0;
FD_ZERO (&rs);
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: better fix for #4884 avoiding the problematic detach and the ERSCH-issue,
gnunet <=