From owner-svn-src-all@FreeBSD.ORG Fri May 3 21:17:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E9D8EB73; Fri, 3 May 2013 21:17:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id C8A7F1563; Fri, 3 May 2013 21:17:33 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1F2A1B939; Fri, 3 May 2013 17:17:33 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r250223 - in head: lib/libprocstat sys/kern sys/sys usr.bin/fstat Date: Fri, 3 May 2013 17:17:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201305032111.r43LBvZ3040508@svn.freebsd.org> In-Reply-To: <201305032111.r43LBvZ3040508@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201305031717.13612.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 03 May 2013 17:17:33 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2013 21:17:34 -0000 On Friday, May 03, 2013 5:11:57 pm John Baldwin wrote: > Author: jhb > Date: Fri May 3 21:11:57 2013 > New Revision: 250223 > URL: http://svnweb.freebsd.org/changeset/base/250223 > > Log: > Similar to 233760 and 236717, export some more useful info about the > kernel-based POSIX semaphore descriptors to userland via procstat(1) and > fstat(1): > - Change sem file descriptors to track the pathname they are associated > with and add a ksem_info() method to copy the path out to a > caller-supplied buffer. > - Use the fo_stat() method of shared memory objects and ksem_info() to > export the path, mode, and value of a semaphore via struct kinfo_file. > - Add a struct semstat to the libprocstat(3) interface along with a > procstat_get_sem_info() to export the mode and value of a semaphore. > - Teach fstat about semaphores and to display their path, mode, and value. > > MFC after: 2 weeks I do realize that the POSIX semaphore API only uses these descriptors for 8.x and earlier, but this is still useful info if you are using 8.x (where I will MFC this), or if you are using an 8.x world or chroot with a newer kernel. -- John Baldwin