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>
This commit is contained in:
Martin Sustrik
2010-11-27 22:19:43 +01:00
parent 0bc2a05d84
commit 325dd2f091
3 changed files with 46 additions and 37 deletions

View File

@@ -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&);
};