From 325dd2f0914de502ae7687f94927fa98c20380c9 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 27 Nov 2010 22:19:43 +0100 Subject: 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 --- src/thread.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/thread.hpp') diff --git a/src/thread.hpp b/src/thread.hpp index 519a34a..46745a5 100644 --- a/src/thread.hpp +++ b/src/thread.hpp @@ -54,20 +54,20 @@ namespace zmq // Waits for thread termination. void stop (); + + // These are internal members. They should be private, however then + // they would not be accessible from the main C routine of the thread. + thread_fn *tfn; + void *arg; private: #ifdef ZMQ_HAVE_WINDOWS - static unsigned int __stdcall thread_routine (void *arg_); HANDLE descriptor; #else - static void *thread_routine (void *arg_); pthread_t descriptor; #endif - thread_fn *tfn; - void *arg; - thread_t (const thread_t&); void operator = (const thread_t&); }; -- cgit v1.2.3