From owner-freebsd-arch Wed Nov 29 17:49: 7 2000 Delivered-To: freebsd-arch@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id CE62F37B401 for ; Wed, 29 Nov 2000 17:49:05 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id eAU1n5K05837 for arch@FreeBSD.ORG; Wed, 29 Nov 2000 17:49:05 -0800 (PST) Date: Wed, 29 Nov 2000 17:49:05 -0800 From: Alfred Perlstein To: arch@FreeBSD.ORG Subject: HEADSUP user struct ucred -> xucred (Was: Re: serious problem with mutexs and userland visibility?) Message-ID: <20001129174905.S8051@fw.wintelcom.net> References: <20001129125508.O8051@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001129125508.O8051@fw.wintelcom.net>; from bright@wintelcom.net on Wed, Nov 29, 2000 at 12:55:09PM -0800 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Alfred Perlstein [001129 12:55] wrote: > > I recently locked down struct ucred, not a big deal, basically just > a mutex in each struct to protect the refcount. > > Unfortunetly struct ucred is used by some userland utils and > sys/ucred is included in sys/mount.h as well as sys/user.h, this > creates somewhat of a problem, forcing all users of sys/ucred.h to > include sys/mutex.g. > > I have a patch here that sort of takes care of this problem, the > problem is that I had to add sys/mutex.h includes to both sys/mount.h > and sys/user.h, this doesn't make me very happy. After a short discussion it has been determined that there will be a xucred exported to userland following the concention of xsocket and the various other xfoo structs exported to the kernel. Struct ucred will no longer be visible outside the kernel. Any userland things using struct ucred will need to use xucred. This will be the convention used to resolve mutex (or other MD fields) in kernel exported structures in the future. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message