aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Fu <vincent.fu@samsung.com>2023-10-19 08:37:23 -0400
committerVincent Fu <vincent.fu@samsung.com>2023-10-19 08:37:23 -0400
commit21958b9d18af12d45b450959b892804cf0225617 (patch)
treeabcd1c2d31a76c92b39e0c8f8b9d85d4f7c72f1f
parent2038b72b189af6f553c023a393b00d262271231b (diff)
parent864742594519946b0bcf9f5f351676b01772b601 (diff)
downloadfio-21958b9d18af12d45b450959b892804cf0225617.tar.gz
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.
-rwxr-xr-xconfigure3
-rw-r--r--helper_thread.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/configure b/configure
index 36184a58a..742cb7c53 100755
--- a/configure
+++ b/configure
@@ -864,7 +864,8 @@ cat > $TMPC <<EOF
#include <signal.h> /* pthread_sigmask() */
int main(void)
{
- return pthread_sigmask(0, NULL, NULL);
+ sigset_t sigmask;
+ return pthread_sigmask(0, NULL, &sigmask);
}
EOF
if compile_prog "" "$LIBS" "pthread_sigmask" ; then
diff --git a/helper_thread.c b/helper_thread.c
index 53dea44ba..2a9dabf5f 100644
--- a/helper_thread.c
+++ b/helper_thread.c
@@ -106,13 +106,14 @@ static int read_from_pipe(int fd, void *buf, size_t len)
static void block_signals(void)
{
-#ifdef HAVE_PTHREAD_SIGMASK
+#ifdef CONFIG_PTHREAD_SIGMASK
sigset_t sigmask;
+ int ret;
+
ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask);
assert(ret == 0);
ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL);
- assert(ret == 0);
#endif
}