Re: [PATCH] Futex Generalization Patch

From: Peter Wächtler (pwaechtler@loewe-komp.de)
Date: Tue Apr 16 2002 - 15:03:10 EST


Hubertus Franke wrote:
>
> On Monday 15 April 2002 10:49 am, Bill Abt wrote:
> > Dealing with the realtime signal is not a problem. Also, saving the extra
> > system call is *BIG* bonus.
> >
>
> Cool
>
> As of Peter's initial message. I took a look at the siginfo_t and Peter's
> statement needs to be corrected "a bit".
> All the members he listed are NOT necessarily available.
>

Well, then we do not comply to susv2. But that's not so bad.

But what we need is there:

typedef union sigval {
        int sival_int;
        void *sival_ptr;
} sigval_t;
[...]
> /* POSIX.1b signals */
> struct {
> pid_t _pid; /* sender's pid */
> uid_t _uid; /* sender's uid */
> sigval_t _sigval;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> } _rt;
>
> } _sifields;
> } siginfo_t;
>
> I'd suggest we tag along the _sigfault semantics.
> We don't need to know who woke us up, just which <addr> got signalled.
>

Please not, this would be confusing.

we can add our si_code and our own struct to the union as suggested
by Mark and me.

--- /usr/local/src/linux-2.5.7/include/asm-i386/siginfo.h ---
/*
 * si_code values
 * Digital reserves positive values for kernel-generated signals.
 */
#define SI_USER 0 /* sent by kill, sigsend, raise */
#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */
#define SI_QUEUE -1 /* sent by sigqueue */
#define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */
#define SI_MESGQ -3 /* sent by real time mesq state change */
#define SI_ASYNCIO -4 /* sent by AIO completion */
#define SI_SIGIO -5 /* sent by queued SIGIO */
#define SI_TKILL -6 /* sent by tkill system call */
#define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */
--- snip ---
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:16 EST