Subject: Re: more siginfo q;s
To: enami tsugutomo <enami@but-b.or.jp>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 09/14/2003 13:30:19
On Sep 14, 5:43pm, enami@but-b.or.jp (enami tsugutomo) wrote:
-- Subject: Re: more siginfo q;s
| > +static void ksiginfo_del(struct proc *p, ksiginfo_t *);
|
| The p isn't necessary.
How do I clear the pointer so sigctx?
| > + if (
| > +#ifdef notyet /* XXX: QUEUING */
| > + ksi->ksi_signo >= SIGRTMIN ||
| > +#endif
| > + (kpool = ksiginfo_get(p, ksi->ksi_signo)) == NULL) {
| > + if ((kpool = pool_get(&ksiginfo_pool, PR_NOWAIT)) == NULL)
| > + return;
| > + *kpool = *ksi;
| > + ksiginfo_put(p, kpool);
| > + } else
| > + *kpool = *ksi;
|
| As the ksiginfo_get() returns an element with leaving it on the list,
| I guess the assignment in the else-clause break the list.
Yes, this is a problem. I'll fix it.
| > + exithook_establish(ksiginfo_exithook, NULL);
|
| Use tab to indent.
Fixed, simon caught it.
| > + kpsendsig(l, ksi, returnmask);
| > + ksiginfo_del(p, ksi);
| > + pool_put(&ksiginfo_pool, ksi);
|
| Hmm, it looks like kpsendsig() may sleep but are you sure that bad
| thing won't occur? (I don't know since I just read this diff through
| peephole).
What kind of bad thing you are thinking of?
| > + struct ksiginfo *ksi_next;
| > + struct ksiginfo *ksi_prev;
|
| Why needs to be doublly linked?
I had it a singly linked list, but I thought that the performance/storage
trade-off is better for the doubly linked list, specially for queued signals.
christos