summaryrefslogtreecommitdiff
path: root/src/thread.cpp
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2011-09-08 16:38:46 +0200
committerMartin Lucina <martin@lucina.net>2012-01-23 08:54:16 +0100
commit88f712b4a31c95caef4f34c4ec65793c392314a6 (patch)
tree2f17936ce9d53b1b13908e8d4288846aaa604263 /src/thread.cpp
parentad3e013f74d309b86e8f087932203e5787fe2d2d (diff)
parent75af6aed482ab16997c1388fe801f74d11ec12a4 (diff)
Imported Debian patch 2.1.9-1debian/2.1.9-1
Diffstat (limited to 'src/thread.cpp')
-rw-r--r--src/thread.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/thread.cpp b/src/thread.cpp
index 7bf9df0..8e33eff 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -40,7 +40,7 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_)
arg =arg_;
descriptor = (HANDLE) _beginthreadex (NULL, 0,
&::thread_routine, this, 0 , NULL);
- win_assert (descriptor != NULL);
+ win_assert (descriptor != NULL);
}
void zmq::thread_t::stop ()
@@ -59,17 +59,19 @@ extern "C"
{
static void *thread_routine (void *arg_)
{
- #if !defined ZMQ_HAVE_OPENVMS
+#if !defined ZMQ_HAVE_OPENVMS
// Following code will guarantee more predictable latecnies as it'll
// disallow any signal handling in the I/O thread.
sigset_t signal_set;
int rc = sigfillset (&signal_set);
errno_assert (rc == 0);
+# if !defined ZMQ_HAVE_ANDROID
rc = pthread_sigmask (SIG_BLOCK, &signal_set, NULL);
- errno_assert (rc == 0);
- #endif
+ posix_assert (rc);
+# endif
+#endif
- zmq::thread_t *self = (zmq::thread_t*) arg_;
+ zmq::thread_t *self = (zmq::thread_t*) arg_;
self->tfn (self->arg);
return NULL;
}
@@ -80,13 +82,13 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_)
tfn = tfn_;
arg =arg_;
int rc = pthread_create (&descriptor, NULL, thread_routine, this);
- errno_assert (rc == 0);
+ posix_assert (rc);
}
void zmq::thread_t::stop ()
{
int rc = pthread_join (descriptor, NULL);
- errno_assert (rc == 0);
+ posix_assert (rc);
}
#endif