From owner-freebsd-hackers Mon Jun 26 9:21:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mta4.rcsntx.swbell.net (mta4.rcsntx.swbell.net [151.164.30.28]) by hub.freebsd.org (Postfix) with ESMTP id 407C237BD71 for ; Mon, 26 Jun 2000 09:21:24 -0700 (PDT) (envelope-from chris@holly.calldei.com) Received: from holly.calldei.com ([208.191.149.190]) by mta4.rcsntx.swbell.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0FWR0041ZRW40L@mta4.rcsntx.swbell.net> for freebsd-hackers@FreeBSD.ORG; Mon, 26 Jun 2000 11:16:53 -0500 (CDT) Received: (from chris@localhost) by holly.calldei.com (8.9.3/8.9.3) id LAA51255; Mon, 26 Jun 2000 11:14:54 -0500 (CDT envelope-from chris) Date: Mon, 26 Jun 2000 11:14:53 -0500 From: Chris Costello Subject: Re: struct proc In-reply-to: <3957ABBD.6010407@mail.ru> To: Fox Anderson Cc: freebsd-hackers@FreeBSD.ORG Reply-To: chris@calldei.com Message-id: <20000626111453.E20702@holly.calldei.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii User-Agent: Mutt/0.96.4i References: <3957ABBD.6010407@mail.ru> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, June 26, 2000, Fox Anderson wrote: > Hi all! > > 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. -- |Chris Costello |It wasn't as easy to get programs right as we had thought. - Wilkes, 1949 `-------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message