:>    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]
:...

    Even in an MP system, curproc is not going to be ripped out from
    under a syscall.  p will always be curproc.  (curproc in an MP
    system is a per-cpu variable).

    This whole p vs curproc thing is a huge mess.  95% of the time
    p == curproc.  The only places where it might not is in I/O ops
    that are completed by an interrupt or (in the case of NFS) some
    other process.

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to