summaryrefslogtreecommitdiff
path: root/src/thread.hpp
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 /src/thread.hpp
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 'src/thread.hpp')
-rw-r--r--src/thread.hpp10
1 files changed, 5 insertions, 5 deletions
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&);
};