Author: bonefish Date: 2011-05-22 02:05:39 +0200 (Sun, 22 May 2011) New Revision: 41641 Changeset: https://dev.haiku-os.org/changeset/41641 Modified: haiku/branches/developer/bonefish/signals/headers/posix/signal.h Log: * Named siginfo_t structure. * Adjusted documentation for the BeOS extended signal handlers: Unlike in BeOS we pass a vregs pointer to the handler instead of passing the structure by reference. Unlike assumed before this does make a difference for the callee, so the two methods are not binary compatible. Modified: haiku/branches/developer/bonefish/signals/headers/posix/signal.h =================================================================== --- haiku/branches/developer/bonefish/signals/headers/posix/signal.h 2011-05-21 22:41:49 UTC (rev 41640) +++ haiku/branches/developer/bonefish/signals/headers/posix/signal.h 2011-05-22 00:05:39 UTC (rev 41641) @@ -34,7 +34,7 @@ void* sival_ptr; }; -typedef struct { +typedef struct __siginfo_t { int si_signo; /* signal number */ int si_code; /* signal code */ int si_errno; /* if non zero, an error number associated with @@ -283,7 +283,7 @@ * handling. It also allows an opportunity, via the 'sigaction' struct, to * enable additional data to be passed to the handler. For example: * void - * my_signal_handler(int sig, char* userData, vregs regs) + * my_signal_handler(int sig, char* userData, vregs* regs) * { * . . . * } @@ -313,10 +313,14 @@ * * 3) The third argument is a pointer to a vregs struct (defined below). * The vregs struct contains the contents of the volatile registers at - * the time the signal was delivered to your thread. You can change the fields - * of the structure. After your signal handler completes, the OS uses this struct - * to reload the registers for your thread (privileged registers are not loaded - * of course). The vregs struct is of course terribly machine dependent. + * the time the signal was delivered to your thread. You can change the + * fields of the structure. After your signal handler completes, the OS uses + * this struct to reload the registers for your thread (privileged registers + * are not loaded of course). The vregs struct is of course terribly machine + * dependent. + * Note that in BeOS the vregs argument was passed by value, not by pointer. + * While Haiku retains binary compability with code compiled for BeOS, code + * built under Haiku must use the pointer argument. */ /* @@ -324,8 +328,6 @@ * * signal handlers get this as the last argument */ - - typedef struct vregs vregs; /* BeOS extension */