Subject: Re: pthreads in userland, signals, and itimer.
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Michael Graff <explorer@flame.org>
List: tech-kern
Date: 11/08/1999 11:05:01
der Mouse <mouse@Rodents.Montreal.QC.CA> writes:
> > I have added to the -current kernel two new signals, and two new
> > itimers. [...threading goop...]
>
> > - if ((u_int)which > ITIMER_PROF)
> > + if ((u_int)which > ITIMER_THREADV)
>
> > - if ((u_int)which > ITIMER_PROF)
> > + if ((u_int)which > ITIMER_THREADV)
>
> I'd be inclined to add an ITIMER__LAST or some such.
I was as well, but the laptop battery was running low. I'll make this
change as well. And worse, there is a hard-coded "3" or "5" in one
header file dealing with process structures.
BTW, I noticed that "struct proc" has two timers (now), one real, one
thread-real. The "struct pstats" has a timer array (3 before, 5 now)
but two of them are never used.
I'm assuming we can't use the ones in struct pstats
> > +#define SIGTHREAD 33 /* thread library private alarm */
> > +#define SIGTHREADV 33 /* thread library private alarm */
>
> I find it hard to believe this isn't a typo - surely one of them should
> be 34?
It is. Fixed.