summaryrefslogtreecommitdiff
path: root/src/thread.cpp
diff options
context:
space:
mode:
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