From owner-freebsd-smp Mon Oct 23 11:58: 9 2000 Delivered-To: freebsd-smp@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 0D9C837B4C5; Mon, 23 Oct 2000 11:58:06 -0700 (PDT) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.9.3) with ESMTP id e9NL2GU14130; Mon, 23 Oct 2000 23:02:16 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: John Baldwin Cc: freebsd-smp@FreeBSD.ORG, mjacob@feral.com Subject: Re: cvs commit: src/sys/sys mutex.h In-Reply-To: Your message of "Mon, 23 Oct 2000 11:44:36 PDT." Date: Mon, 23 Oct 2000 23:02:16 +0200 Message-ID: <14128.972334936@critter> From: Poul-Henning Kamp Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message , John Baldwin writes: >> I think a function to get the current thread/proc should not require >> to be included, most places just need to pass a reference, >> they don't need to even know how the entrails of a proccess is >> arranged, so obviously they should not need #included.\ > >I have to have the type. The function returns a type. You can do that simply with: struct proc; struct proc *getcurproc(); You don't need the contents of a struct fiddle a pointer to it. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message