[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 09/13: in null threads, don't define sigmask stub when p
From: |
Mike Gran |
Subject: |
[Guile-commits] 09/13: in null threads, don't define sigmask stub when pthread_sigmask does not exist |
Date: |
Thu, 21 Jan 2021 19:06:17 -0500 (EST) |
mike121 pushed a commit to branch master
in repository guile.
commit 449b9bd5e15c4589698055b5fd704abb20840d42
Author: Michael Gran <spk121@yahoo.com>
AuthorDate: Mon Nov 23 17:30:13 2020 -0800
in null threads, don't define sigmask stub when pthread_sigmask does not
exist
* libguile/gen-scmconfig.c (main) [HAVE_PTHREAD_SIGMASK]: new output
define SCM_HAVE_PTHREAD_SIGMASK
* libguile/null-threads.h (scm_i_pthread_sigmask)
[SCM_HAVE_PTHREAD_SIGMASK]:
make inline function conditional on existence of pthread_sigmask
---
libguile/gen-scmconfig.c | 12 +++++++++---
libguile/null-threads.h | 4 +++-
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index 8d77dfa..a3c7320 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -1,4 +1,4 @@
-/* Copyright 2003-2013,2018
+/* Copyright 2003-2013,2018,2020
Free Software Foundation, Inc.
This file is part of Guile.
@@ -20,7 +20,7 @@
/**********************************************************************
Description of Guile's public config header mechanics:
- -----------------------------------------------------
+ -----------------------------------------------------
Guile has three core headers:
@@ -153,7 +153,7 @@ main (int argc, char *argv[])
"\n"
"#ifndef SCM_SCMCONFIG_H\n"
"#define SCM_SCMCONFIG_H\n");
-
+
/*** various important headers ***/
pf ("\n");
pf ("/* Important headers */\n");
@@ -289,6 +289,12 @@ main (int argc, char *argv[])
pf ("#define SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER %d /* 0 or 1 */\n",
SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER);
+#ifdef HAVE_PTHREAD_SIGMASK
+ pf ("#define SCM_HAVE_PTHREAD_SIGMASK 1 /* 0 or 1 */\n");
+#else
+ pf ("#define SCM_HAVE_PTHREAD_SIGMASK 0 /* 0 or 1 */\n");
+#endif
+
#ifdef HAVE_GC_PTHREAD_CANCEL
pf ("#define SCM_HAVE_GC_PTHREAD_CANCEL 1 /* 0 or 1 */\n");
#else
diff --git a/libguile/null-threads.h b/libguile/null-threads.h
index 88926fa..be72346 100644
--- a/libguile/null-threads.h
+++ b/libguile/null-threads.h
@@ -1,7 +1,7 @@
#ifndef SCM_NULL_THREADS_H
#define SCM_NULL_THREADS_H
-/* Copyright 2005-2006,2010,2018
+/* Copyright 2005-2006,2010,2018,2020
Free Software Foundation, Inc.
This file is part of Guile.
@@ -83,11 +83,13 @@ scm_i_sched_yield (void)
/* Signals
*/
+#if SCM_HAVE_PTHREAD_SIGMASK == 1
static inline int
scm_i_pthread_sigmask (int how, const sigset_t *set, sigset_t *oldset)
{
return sigprocmask (how, set, oldset);
}
+#endif
/* Mutexes
*/
- [Guile-commits] branch master updated (1a6eaba -> 91d4d31), Mike Gran, 2021/01/21
- [Guile-commits] 02/13: for socket test, don't presume TMP is usable, Mike Gran, 2021/01/21
- [Guile-commits] 01/13: encoding test tries to delete a file that is not closed, Mike Gran, 2021/01/21
- [Guile-commits] 04/13: in command line encoding test don't presume extant UTF-8 locale, Mike Gran, 2021/01/21
- [Guile-commits] 03/13: skip compile test when pause not available, Mike Gran, 2021/01/21
- [Guile-commits] 06/13: test-foreign-object-c should link libgnu, Mike Gran, 2021/01/21
- [Guile-commits] 05/13: for dynamic-link tests, mingw needs to link to msvcrt, Mike Gran, 2021/01/21
- [Guile-commits] 07/13: missing includes for list.h, Mike Gran, 2021/01/21
- [Guile-commits] 08/13: Need Guile and Windows types for the declarations posix-w32, Mike Gran, 2021/01/21
- [Guile-commits] 09/13: in null threads, don't define sigmask stub when pthread_sigmask does not exist,
Mike Gran <=
- [Guile-commits] 11/13: standalone tests require libgnu on DLL-based platforms, Mike Gran, 2021/01/21
- [Guile-commits] 12/13: avoid a ports test when fcntl is not provided, Mike Gran, 2021/01/21
- [Guile-commits] 10/13: skip version test if git-version-gen can't compute version from git, Mike Gran, 2021/01/21
- [Guile-commits] 13/13: socket test should not throw unresolved outside of a test, Mike Gran, 2021/01/21