summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-11-27 22:19:43 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-11-27 22:19:43 +0100
commit325dd2f0914de502ae7687f94927fa98c20380c9 (patch)
tree8007a7b66e37afadfc737a819150a507e723bc25 /tests
parent0bc2a05d84dc8e496a60d0c8def7689783e08e01 (diff)
Functions passed to pthread_create are declared as extern "C"
So far these were declared as C++ static functions which was incorrect and caused warnings with SunStudio. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_shutdown_stress.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/test_shutdown_stress.cpp b/tests/test_shutdown_stress.cpp
index a8079d4..fed67b7 100644
--- a/tests/test_shutdown_stress.cpp
+++ b/tests/test_shutdown_stress.cpp
@@ -24,18 +24,21 @@
#define THREAD_COUNT 100
-void *worker (void *s)
+extern "C"
{
- int rc;
+ static void *worker (void *s)
+ {
+ int rc;
- rc = zmq_connect (s, "tcp://127.0.0.1:5555");
- assert (rc == 0);
+ rc = zmq_connect (s, "tcp://127.0.0.1:5555");
+ assert (rc == 0);
- // Start closing the socket while the connecting process is underway.
- rc = zmq_close (s);
- assert (rc == 0);
+ // Start closing the socket while the connecting process is underway.
+ rc = zmq_close (s);
+ assert (rc == 0);
- return NULL;
+ return NULL;
+ }
}
int main (int argc, char *argv [])