Subject: Re: SA_SIGINFO notes
To: Paul Kranenburg <pk@cs.few.eur.nl>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 10/07/2003 14:50:59
On Oct 7,  8:20pm, pk@cs.few.eur.nl (Paul Kranenburg) wrote:
-- Subject: Re: SA_SIGINFO notes

| I intentionally omitted the `memset()' in the trap handler because all
| fields were set explicitly (I'm aware that I forgot about _errno,
| something that I intended to fix).

Yes, but it is nice not to return random values to userland for the
unused fields of the structure...

| I'm still not sure what sort of knowledge the consumers of KSI_TRAP_P()
| (e.g. kpsendsig()) want to establish. Is it `synchronous' vs `a-synchronous'
| event that has lead to the delivery of this signal (i.e. something that's
| related to the thread's own instruction stream vs. something external)?
| 
| If so, what about say a-synchronous memory errors that are not necessarily
| related to a thread's execution sequence?

I think it is related to interrupted thread vs. a thread that got an event.
Threads that got an event (in the signal case) are the ones that got a trap.
The rest are treated as being interrupted. I presume that this is because
we want to send a trap to a specific lwp, but we can send another signal
to any lwp (that is my guess).

christos