Skip to content

Commit 21958b9

Browse files
committed
Merge branch 'master' of https://github.com/shailevi23/fio
* 'master' of https://github.com/shailevi23/fio: helper_thread: fix pthread_sigmask typo. configure: improve pthread_sigmask detection.
2 parents 2038b72 + 8647425 commit 21958b9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

configure

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,8 @@ cat > $TMPC <<EOF
864864
#include <signal.h> /* pthread_sigmask() */
865865
int main(void)
866866
{
867-
return pthread_sigmask(0, NULL, NULL);
867+
sigset_t sigmask;
868+
return pthread_sigmask(0, NULL, &sigmask);
868869
}
869870
EOF
870871
if compile_prog "" "$LIBS" "pthread_sigmask" ; then

helper_thread.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,14 @@ static int read_from_pipe(int fd, void *buf, size_t len)
106106

107107
static void block_signals(void)
108108
{
109-
#ifdef HAVE_PTHREAD_SIGMASK
109+
#ifdef CONFIG_PTHREAD_SIGMASK
110110
sigset_t sigmask;
111111

112+
int ret;
113+
112114
ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask);
113115
assert(ret == 0);
114116
ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL);
115-
assert(ret == 0);
116117
#endif
117118
}
118119

0 commit comments

Comments
 (0)