Subject: Re: ktrace records now get lwp id
To: Jaromir Dolecek <>
From: Nathan J. Williams <>
List: tech-kern
Date: 06/28/2003 14:09:42
Jaromir Dolecek <> writes:

> Also, why exactly did you change all the files when the only place
> you need the lwp pointer are the ktrace routines, and you could
> just use curlwp there?

In general, using curlwp is wrong (as well as potentially expensive to
evaluate on SMP machines). Passing around the value of the lwp that
actually made some request or other, as Darren's patch did, is the
right thing to do.

Note that many uses of curlwp and curproc in the kernel are marked
XXX; the assumption that the request being processed was made by the
current LWP is one that we should eventually eradicate.

        - Nathan