summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
68d4631)
ust_lock_nocheck is meant to be async-signal-safe for use from the
fork() override helper (and fork(2) is async-signal-safe).
Remove calls to strerror() from ust lock functions and from the
cancelstate helper because strerror is not async-signal-safe and indeed
allocates memory.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I461f3631a24e71232d987b0a984b4942903bf9ac
goto end;
ret = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
if (ret) {
goto end;
ret = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
if (ret) {
- ERR("pthread_setcancelstate: %s", strerror(ret));
+ ERR("pthread_setcancelstate: ret=%d", ret);
return -1;
}
state->oldstate = oldstate;
return -1;
}
state->oldstate = oldstate;
goto end;
ret = pthread_setcancelstate(state->oldstate, &oldstate);
if (ret) {
goto end;
ret = pthread_setcancelstate(state->oldstate, &oldstate);
if (ret) {
- ERR("pthread_setcancelstate: %s", strerror(ret));
+ ERR("pthread_setcancelstate: ret=%d", ret);
return -1;
}
if (oldstate != PTHREAD_CANCEL_DISABLE) {
return -1;
}
if (oldstate != PTHREAD_CANCEL_DISABLE) {
sigfillset(&sig_all_blocked);
ret = pthread_sigmask(SIG_SETMASK, &sig_all_blocked, &orig_mask);
if (ret) {
sigfillset(&sig_all_blocked);
ret = pthread_sigmask(SIG_SETMASK, &sig_all_blocked, &orig_mask);
if (ret) {
- ERR("pthread_sigmask: %s", strerror(ret));
+ ERR("pthread_sigmask: ret=%d", ret);
}
if (!URCU_TLS(ust_mutex_nest)++)
pthread_mutex_lock(&ust_mutex);
ret = pthread_sigmask(SIG_SETMASK, &orig_mask, NULL);
if (ret) {
}
if (!URCU_TLS(ust_mutex_nest)++)
pthread_mutex_lock(&ust_mutex);
ret = pthread_sigmask(SIG_SETMASK, &orig_mask, NULL);
if (ret) {
- ERR("pthread_sigmask: %s", strerror(ret));
+ ERR("pthread_sigmask: ret=%d", ret);
}
if (lttng_ust_comm_should_quit) {
return -1;
}
if (lttng_ust_comm_should_quit) {
return -1;
sigfillset(&sig_all_blocked);
ret = pthread_sigmask(SIG_SETMASK, &sig_all_blocked, &orig_mask);
if (ret) {
sigfillset(&sig_all_blocked);
ret = pthread_sigmask(SIG_SETMASK, &sig_all_blocked, &orig_mask);
if (ret) {
- ERR("pthread_sigmask: %s", strerror(ret));
+ ERR("pthread_sigmask: ret=%d", ret);
}
if (!URCU_TLS(ust_mutex_nest)++)
pthread_mutex_lock(&ust_mutex);
ret = pthread_sigmask(SIG_SETMASK, &orig_mask, NULL);
if (ret) {
}
if (!URCU_TLS(ust_mutex_nest)++)
pthread_mutex_lock(&ust_mutex);
ret = pthread_sigmask(SIG_SETMASK, &orig_mask, NULL);
if (ret) {
- ERR("pthread_sigmask: %s", strerror(ret));
+ ERR("pthread_sigmask: ret=%d", ret);
sigfillset(&sig_all_blocked);
ret = pthread_sigmask(SIG_SETMASK, &sig_all_blocked, &orig_mask);
if (ret) {
sigfillset(&sig_all_blocked);
ret = pthread_sigmask(SIG_SETMASK, &sig_all_blocked, &orig_mask);
if (ret) {
- ERR("pthread_sigmask: %s", strerror(ret));
+ ERR("pthread_sigmask: ret=%d", ret);
}
if (!--URCU_TLS(ust_mutex_nest))
pthread_mutex_unlock(&ust_mutex);
ret = pthread_sigmask(SIG_SETMASK, &orig_mask, NULL);
if (ret) {
}
if (!--URCU_TLS(ust_mutex_nest))
pthread_mutex_unlock(&ust_mutex);
ret = pthread_sigmask(SIG_SETMASK, &orig_mask, NULL);
if (ret) {
- ERR("pthread_sigmask: %s", strerror(ret));
+ ERR("pthread_sigmask: ret=%d", ret);
}
if (lttng_ust_cancelstate_disable_pop()) {
ERR("lttng_ust_cancelstate_disable_pop");
}
if (lttng_ust_cancelstate_disable_pop()) {
ERR("lttng_ust_cancelstate_disable_pop");