Re: [PATCH] POSIX timers for 2.3.25

Matthew Wilcox (Matthew.Wilcox@genedata.com)
Sun, 7 Nov 1999 18:29:55 +0100


On Sun, Nov 07, 1999 at 05:59:12PM +0100, Robert de Vries wrote:
> The siginfo structure is slightly changed. It moves si_value out of the
> _rt part of the union. si_value is used both by _rt and _timer and must
> map to the same field.

You can't do this. You've just broken binary compatibility with any
application that uses POSIX RT signals. I can't see a nice way of doing
this though. Can anyone else?

> diff -ruN linux-2.3.25-vanilla/include/asm-i386/siginfo.h linux-2.3.25-devt-timer/include/asm-i386/siginfo.h
> --- linux-2.3.25-vanilla/include/asm-i386/siginfo.h Wed Jul 28 19:30:10 1999
> +++ linux-2.3.25-devt-timer/include/asm-i386/siginfo.h Thu Nov 4 22:46:31 1999
> @@ -17,6 +17,7 @@
> int si_signo;
> int si_errno;
> int si_code;
> + sigval_t si_value;
>
> union {
> int _pad[SI_PAD_SIZE];
> @@ -29,15 +30,13 @@
>
> /* POSIX.1b timers */
> struct {
> - unsigned int _timer1;
> - unsigned int _timer2;
> + timer_t _tid; /* timer id */
> } _timer;
>
> /* POSIX.1b signals */
> struct {
> pid_t _pid; /* sender's pid */
> uid_t _uid; /* sender's uid */
> - sigval_t _sigval;
> } _rt;
>
> /* SIGCHLD */
> @@ -67,12 +66,12 @@
> */
> #define si_pid _sifields._kill._pid
> #define si_uid _sifields._kill._uid
> +#define si_tid _sifields._timer._tid
> #define si_status _sifields._sigchld._status
> #define si_utime _sifields._sigchld._utime
> #define si_stime _sifields._sigchld._stime
> -#define si_value _sifields._rt._sigval
> -#define si_int _sifields._rt._sigval.sival_int
> -#define si_ptr _sifields._rt._sigval.sival_ptr
> +#define si_int si_value.sival_int
> +#define si_ptr si_value.sival_ptr
> #define si_addr _sifields._sigfault._addr
> #define si_band _sifields._sigpoll._band
> #define si_fd _sifields._sigpoll._fd

-- 
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/