* [PATCH 2/2] Hurd: Move <hurd/sigpreempt.h> internals into wrapper header
@ 2020-05-28 9:23 Florian Weimer via Libc-alpha
2020-05-28 9:32 ` Samuel Thibault
0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer via Libc-alpha @ 2020-05-28 9:23 UTC (permalink / raw)
To: libc-alpha; +Cc: commit-hurd
_hurdsig_preemptors and _hurdsig_preempted_set are not ABI symbols,
so do not declare them. HURD_PREEMPT_SIGNAL_P is an implementation
detail, so move it as well.
---
hurd/hurd/sigpreempt.h | 10 --------
sysdeps/hurd/include/hurd/sigpreempt.h | 32 ++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 10 deletions(-)
create mode 100644 sysdeps/hurd/include/hurd/sigpreempt.h
diff --git a/hurd/hurd/sigpreempt.h b/hurd/hurd/sigpreempt.h
index 4ab5b1369f..8cbf66a198 100644
--- a/hurd/hurd/sigpreempt.h
+++ b/hurd/hurd/sigpreempt.h
@@ -50,16 +50,6 @@ struct hurd_signal_preemptor
struct hurd_signal_preemptor *next; /* List structure. */
};
-#define HURD_PREEMPT_SIGNAL_P(preemptor, signo, sigcode) \
- (((preemptor)->signals & __sigmask (signo)) \
- && (sigcode) >= (preemptor)->first && (sigcode) <= (preemptor)->last)
-
-
-/* Signal preemptors applying to all threads; locked by _hurd_siglock. */
-extern struct hurd_signal_preemptor *_hurdsig_preemptors;
-extern sigset_t _hurdsig_preempted_set;
-
-
/* The caller must initialize all members of *PREEMPTOR except `next'.
The preemptor is registered on the global list. */
void hurd_preempt_signals (struct hurd_signal_preemptor *preemptor);
diff --git a/sysdeps/hurd/include/hurd/sigpreempt.h b/sysdeps/hurd/include/hurd/sigpreempt.h
new file mode 100644
index 0000000000..fc0fdfd5e8
--- /dev/null
+++ b/sysdeps/hurd/include/hurd/sigpreempt.h
@@ -0,0 +1,32 @@
+/* Preemption of Hurd signals before POSIX.1 semantics take over. Wrapper.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _HURD_SIGPREEMPT_H
+# include <hurd/hurd/sigpreempt.h>
+
+# ifndef _ISOMAC
+# define HURD_PREEMPT_SIGNAL_P(preemptor, signo, sigcode) \
+ (((preemptor)->signals & __sigmask (signo)) \
+ && (sigcode) >= (preemptor)->first && (sigcode) <= (preemptor)->last)
+
+/* Signal preemptors applying to all threads; locked by _hurd_siglock. */
+extern struct hurd_signal_preemptor *_hurdsig_preemptors;
+extern sigset_t _hurdsig_preempted_set;
+
+# endif /* _ISOMAC */
+#endif /* _HURD_SIGPREEMPT_H */
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] Hurd: Move <hurd/sigpreempt.h> internals into wrapper header
2020-05-28 9:23 [PATCH 2/2] Hurd: Move <hurd/sigpreempt.h> internals into wrapper header Florian Weimer via Libc-alpha
@ 2020-05-28 9:32 ` Samuel Thibault
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Thibault @ 2020-05-28 9:32 UTC (permalink / raw)
To: Florian Weimer; +Cc: commit-hurd, libc-alpha
Florian Weimer, le jeu. 28 mai 2020 11:23:20 +0200, a ecrit:
> _hurdsig_preemptors and _hurdsig_preempted_set are not ABI symbols,
> so do not declare them. HURD_PREEMPT_SIGNAL_P is an implementation
> detail, so move it as well.
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> hurd/hurd/sigpreempt.h | 10 --------
> sysdeps/hurd/include/hurd/sigpreempt.h | 32 ++++++++++++++++++++++++++
> 2 files changed, 32 insertions(+), 10 deletions(-)
> create mode 100644 sysdeps/hurd/include/hurd/sigpreempt.h
>
> diff --git a/hurd/hurd/sigpreempt.h b/hurd/hurd/sigpreempt.h
> index 4ab5b1369f..8cbf66a198 100644
> --- a/hurd/hurd/sigpreempt.h
> +++ b/hurd/hurd/sigpreempt.h
> @@ -50,16 +50,6 @@ struct hurd_signal_preemptor
> struct hurd_signal_preemptor *next; /* List structure. */
> };
>
> -#define HURD_PREEMPT_SIGNAL_P(preemptor, signo, sigcode) \
> - (((preemptor)->signals & __sigmask (signo)) \
> - && (sigcode) >= (preemptor)->first && (sigcode) <= (preemptor)->last)
> -
> -
> -/* Signal preemptors applying to all threads; locked by _hurd_siglock. */
> -extern struct hurd_signal_preemptor *_hurdsig_preemptors;
> -extern sigset_t _hurdsig_preempted_set;
> -
> -
> /* The caller must initialize all members of *PREEMPTOR except `next'.
> The preemptor is registered on the global list. */
> void hurd_preempt_signals (struct hurd_signal_preemptor *preemptor);
> diff --git a/sysdeps/hurd/include/hurd/sigpreempt.h b/sysdeps/hurd/include/hurd/sigpreempt.h
> new file mode 100644
> index 0000000000..fc0fdfd5e8
> --- /dev/null
> +++ b/sysdeps/hurd/include/hurd/sigpreempt.h
> @@ -0,0 +1,32 @@
> +/* Preemption of Hurd signals before POSIX.1 semantics take over. Wrapper.
> + Copyright (C) 1996-2020 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <https://www.gnu.org/licenses/>. */
> +
> +#ifndef _HURD_SIGPREEMPT_H
> +# include <hurd/hurd/sigpreempt.h>
> +
> +# ifndef _ISOMAC
> +# define HURD_PREEMPT_SIGNAL_P(preemptor, signo, sigcode) \
> + (((preemptor)->signals & __sigmask (signo)) \
> + && (sigcode) >= (preemptor)->first && (sigcode) <= (preemptor)->last)
> +
> +/* Signal preemptors applying to all threads; locked by _hurd_siglock. */
> +extern struct hurd_signal_preemptor *_hurdsig_preemptors;
> +extern sigset_t _hurdsig_preempted_set;
> +
> +# endif /* _ISOMAC */
> +#endif /* _HURD_SIGPREEMPT_H */
> --
> 2.20.1
>
--
Samuel
+#if defined(__alpha__) && defined(CONFIG_PCI)
+ /*
+ * The meaning of life, the universe, and everything. Plus
+ * this makes the year come out right.
+ */
+ year -= 42;
+#endif
(From the patch for 1.3.2: (kernel/time.c), submitted by Marcus Meissner)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-28 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 9:23 [PATCH 2/2] Hurd: Move <hurd/sigpreempt.h> internals into wrapper header Florian Weimer via Libc-alpha
2020-05-28 9:32 ` Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).