cvs commit: src/sys/kern kern_thr.c syscalls.master src/sys/sys

Pawel Jakub Dawidek pjd at
Tue Aug 21 04:43:16 PDT 2007

On Mon, Aug 20, 2007 at 11:47:37AM -0700, Alfred Perlstein wrote:
> * Matthew Dillon <dillon at> [070820 11:43] wrote:
> >     We have a lwp_kill() system call that sends a signal to a thread within
> >     a process.  It turns out to be fairly necessary for any sort of heavily
> >     integrated multi-threaded work.  In our case we need it to be able to
> >     issue IPIs (aka SIGUSR1) to cpus within a SMP virtual kernel.
> > 
> >     int lwp_kill(pid_t pid, lwpid_t tid, int sig);
> > 
> > 						-Matt
> It's always bothered me that there wasn't a generation count
> included in the kill(2) interface.
> What do you think about that?
> It would be useful for pidfiles to ensure that a recycled pid
> doesn't get a program SIGwhatever'd.

I worked on process generation number when I was working on pidfile(3)
API. We had discussion about this and consensus was (AFAIR) that we
don't need that, because for purpose of pidfile(3) we can use flock(2),
which is enough (modulo file systems that doesn't support it).

The probably incomplete and never tested patch you can find here:

(I called it process born ID.)

Pawel Jakub Dawidek             
pjd at                 
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the cvs-src mailing list