In article <[EMAIL PROTECTED]>,
Chris Costello <[EMAIL PROTECTED]> wrote:
> On Monday, June 26, 2000, Fox Anderson wrote:
> > What is the difference between p and curproc in my syscall?
> >
> > static int
> > my_syscall(struct proc *p, my_syscallargs *uap) {
> > curproc->......
> > }
>
> p is the process that made the syscall, curproc is the current
> running process. You should be using p for the process that
> called my_syscall.
Since only one process can enter the kernel at a time (currently),
and p is the process that made the system call, it is also the
current process. I claim that (p == curproc) in this example, and
that it would be better to code with p than with curproc.
John
--
John Polstra [EMAIL PROTECTED]
John D. Polstra & Co., Inc. Seattle, Washington USA
"Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message