Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 1999 00:13:49 -0700 (PDT)
From:      Martin Cracauer <cracauer@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/i386/i386 genassym.c machdep.c src/sys/i386/include frame.h src/sys/kern kern_sig.c src/sys/sys signal.h signalvar.h
Message-ID:  <199907060713.AAA83501@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
cracauer    1999/07/06 00:13:49 PDT

  Modified files:
    sys/i386/i386        genassym.c machdep.c 
    sys/i386/include     frame.h 
    sys/kern             kern_sig.c 
    sys/sys              signal.h signalvar.h 
  Log:
  Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more
  than a review, this was a nice puzzle.
  
  This is supposed to be binary and source compatible with older
  applications that access the old FreeBSD-style three arguments to a
  signal handler.
  
  Except those applications that access hidden signal handler arguments
  bejond the documented third one. If you have applications that do,
  please let me know so that we take the opportunity to provide the
  functionality they need in a documented manner.
  
  Also except application that use 'struct sigframe' directly. You need
  to recompile gdb and doscmd. `make world` is recommended.
  
  Example program that demonstrates how SA_SIGINFO and old-style FreeBSD
  handlers (with their three args) may be used in the same process is at
  http://www3.cons.org/tmp/fbsd-siginfo.c
  
  Programs that use the old FreeBSD-style three arguments are easy to
  change to SA_SIGINFO (although they don't need to, since the old style
  will still work):
  
    Old args to signal handler:
      void handler_sn(int sig, int code, struct sigcontext *scp)
  
    New args:
      void handler_si(int sig, siginfo_t *si, void *third)
    where:
      old:code == new:second->si_code
      old:scp == &(new:si->si_scp)     /* Passed by value! */
  
  The latter is also pointed to by new:third, but accessing via
  si->si_scp is preferred because it is type-save.
  
  FreeBSD implementation notes:
  - This is just the framework to make the interface POSIX compatible.
    For now, no additional functionality is provided. This is supposed
    to happen now, starting with floating point values.
  - We don't use 'sigcontext_t.si_value' for now (POSIX meant it for
    realtime-related values).
  - Documentation will be updated when new functionality is added and
    the exact arguments passed are determined. The comments in
    sys/signal.h are meant to be useful.
  
  Reviewed by:	BDE
  
  Revision  Changes    Path
  1.72      +3 -6      src/sys/i386/i386/genassym.c
  1.353     +47 -30    src/sys/i386/i386/machdep.c
  1.18      +32 -8     src/sys/i386/include/frame.h
  1.57      +22 -8     src/sys/kern/kern_sig.c
  1.15      +59 -17    src/sys/sys/signal.h
  1.24      +2 -1      src/sys/sys/signalvar.h



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907060713.AAA83501>