From owner-freebsd-arch Wed Nov 14 21:18:25 2001 Delivered-To: freebsd-arch@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id C3D1137B416; Wed, 14 Nov 2001 21:18:23 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id fAF5IMW18730; Wed, 14 Nov 2001 21:18:22 -0800 (PST) (envelope-from dillon) Date: Wed, 14 Nov 2001 21:18:22 -0800 (PST) From: Matthew Dillon Message-Id: <200111150518.fAF5IMW18730@apollo.backplane.com> To: Alfred Perlstein Cc: Greg Lehey , Bruce Evans , Peter Wemm , Robert Watson , freebsd-arch@FreeBSD.ORG Subject: Re: cur{thread/proc}, or not. References: <20011112165530.B34657-100000@delplex.bde.org> <200111121009.fACA9SI75024@apollo.backplane.com> <20011111191735.00D053807@overcee.netplex.com.au> <20011112165530.B34657-100000@delplex.bde.org> <200111121009.fACA9SI75024@apollo.backplane.com> <20011115132945.C33267@monorchid.lemis.com> <20011114231057.K13393@elvis.mu.org> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :If you want to see why curproc sucks then please investigate what :happens when you NDINIT a nameidata with another thread pointer :other than your own, then perform a vn_open. kablooey! : :My recent addition of vn_open_cred and modification of nfs_lock.c :was to get around this badness of the API. : :-- :-Alfred Perlstein [alfred@freebsd.org] I'm not sure this is a fair argument. Just about all the code in the system taking a struct thread * pointer assumes that the thread is the current thread and so avoid much of the locking that they would normally have to do on it. Passing some other thread to a good chunk of this code will have very weird broken results. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message