[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 00/15] Hurd signals: please review

From: Jeremie Koenig
Subject: [PATCH 00/15] Hurd signals: please review
Date: Wed, 29 Jun 2011 18:30:12 +0200


I believe my signal-related series of patches for Hurd are mature enough
to be reviewed and considered for inclusion.

They are relatively complicated and I understand the review could take a
while. It would be useful, however, if we could agree in principle on
the public interfaces they introduce, so that they can be tested more
extensively in Debian in the meanwhile. Here's a summary:

* #define SA_SIGINFO 0x40

  This follows the current approach of using BSD values for
  <bits/sigaction.h> constants.

* void _hurd_sigstate_set_global_rcv (struct hurd_sigstate *ss);

  Used by libpthread to mark a thread as a global receiver, meaning the
  thread should receive global signal it doesn't block, and use the
  global action vector instead of a thread-specific one.

* void _hurd_sigstate_lock (struct hurd_sigstate *ss);
* sigset_t _hurd_sigstate_pending (const struct hurd_sigstate *ss);
* void _hurd_sigstate_unlock (struct hurd_sigstate *ss);

  Used to access a thread's set of pending signals, including global
  signals if appropriate.

* void _hurd_sigstate_delete (thread_t thread);

  Delete the sigstate structure associated to THREAD. We need this to avoid
  attempting the delivery of global signals to terminated threads.

The patch series can be broken down in three parts. Each one could be
applied without the subsequent ones:

* Signal code refactoring. These patches should not change the current
  behavior, although they do fix a few minor bugs which were made
  apparent in the process. They are unchanged from my previous post
  earlier this month.

  _hurd_internal_post_signal: Split into more functions
  _hurd_internal_post_signal: Scope variables more restrictively
  _hurd_internal_post_signal: Split out inner functions
  Hurd signals: refactor check_pending_signals
  Hurd signals: reindent
  Hurd signals: make sigsuspend POSIX-conformant.
  Hurd signals: fix uninitialized value.

* Global signal dispositions. Although they should not change the
  default behaviors of signals for cthread programs, these patches add
  new functions which can be used by libpthread to enable
  POSIX-conforming behavior of signals on a per-thread basis.

  Versions.def: add GLIBC_2.15
  Hurd signals: implement global signal dispositions
  Hurd signals: provide a sigstate destructor
  Hurd signals: fix sigwait() for global signals
  Hurd signals: fix global untraced signals.

* SA_SIGINFO. These patches implement SA_SIGINFO signal handlers.

  Hurd signals: Copy bits/sigaction.h
  Hurd signals: SA_SIGINFO support
  Hurd signals: Use POSIX sigcodes

 Versions.def                             |    1 +
 hurd/Versions                            |    8 +
 hurd/ctty-input.c                        |   18 +-
 hurd/ctty-output.c                       |   18 +-
 hurd/hurd/signal.h                       |   40 ++-
 hurd/hurdexec.c                          |   11 +-
 hurd/hurdinit.c                          |    2 +-
 hurd/hurdmsg.c                           |   15 +-
 hurd/hurdsig.c                           |  504 +++++++++++++++++++++---------
 manual/signal.texi                       |    2 +-
 sysdeps/mach/hurd/bits/sigaction.h       |   79 +++++
 sysdeps/mach/hurd/fork.c                 |   11 +-
 sysdeps/mach/hurd/i386/bits/sigcontext.h |   22 --
 sysdeps/mach/hurd/i386/exc2signal.c      |  106 ++++---
 sysdeps/mach/hurd/i386/sigreturn.c       |   13 +-
 sysdeps/mach/hurd/i386/trampoline.c      |  112 ++++++-
 sysdeps/mach/hurd/kill.c                 |    2 +-
 sysdeps/mach/hurd/setitimer.c            |    2 +-
 sysdeps/mach/hurd/sigaction.c            |   18 +-
 sysdeps/mach/hurd/sigpending.c           |    9 +-
 sysdeps/mach/hurd/sigprocmask.c          |   11 +-
 sysdeps/mach/hurd/sigsuspend.c           |   19 +-
 sysdeps/mach/hurd/sigwait.c              |   25 +-
 sysdeps/mach/hurd/spawni.c               |   25 +-
 24 files changed, 739 insertions(+), 334 deletions(-)
 create mode 100644 sysdeps/mach/hurd/bits/sigaction.h



reply via email to

[Prev in Thread] Current Thread [Next in Thread]