From owner-freebsd-hackers Fri Oct 6 7:46:28 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gw.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id AF27C37B502 for ; Fri, 6 Oct 2000 07:46:26 -0700 (PDT) Received: from hamlet.nectar.com (hamlet.nectar.com [10.0.1.102]) by gw.nectar.com (Postfix) with ESMTP id A4B2C1925E; Fri, 6 Oct 2000 09:46:25 -0500 (CDT) Received: (from nectar@localhost) by hamlet.nectar.com (8.9.3/8.9.3) id JAA69723; Fri, 6 Oct 2000 09:46:25 -0500 (CDT) (envelope-from nectar@spawn.nectar.com) Date: Fri, 6 Oct 2000 09:46:25 -0500 From: "Jacques A. Vidrine" To: Alfred Perlstein Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: _THREAD_SAFE in libc Message-ID: <20001006094625.A68725@hamlet.nectar.com> Mail-Followup-To: "Jacques A. Vidrine" , Alfred Perlstein , freebsd-hackers@FreeBSD.ORG References: <20001005181751.A68499@hamlet.nectar.com> <20001005162255.T27736@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: <20001005162255.T27736@fw.wintelcom.net>; from bright@wintelcom.net on Thu, Oct 05, 2000 at 04:22:56PM -0700 X-Url: http://www.nectar.com/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Oct 05, 2000 at 04:22:56PM -0700, Alfred Perlstein wrote: > * Jacques A. Vidrine [001005 16:18] wrote: > > Is it ok to use pthread_rwlock* and other such primitives in code in > > src/lib/libc (when _THREAD_SAFE is defined, of course)? > > It sure looks like it. > > cd /usr/src/lib/libc/ ; grep pthread */* I didn't see all those pthread_mutex*s because I was looking for pthread_rwlock*s :-) Which leads me to wonder if I _want_ pthread_rwlock. The overhead might outweigh the benefits of finer-grained locking. Besides, there doesn't seem to be a good way of promoting a lock from read->write. -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message