From owner-freebsd-threads@FreeBSD.ORG Thu Jun 5 04:42:44 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FDCC37B401 for ; Thu, 5 Jun 2003 04:42:44 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0593B43FDD for ; Thu, 5 Jun 2003 04:42:44 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfmr7.dialup.mindspring.com ([165.247.219.103] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19Nt8g-0006E6-00; Thu, 05 Jun 2003 04:42:39 -0700 Message-ID: <3EDF2C6B.7A8E5C21@mindspring.com> Date: Thu, 05 Jun 2003 04:41:31 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel Eischen References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4394c788ad2786350066fea3bf2740a44387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c cc: Kern Sibbald cc: freebsd-threads@freebsd.org Subject: Re: FreeBSD pthread_equal "bug" X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2003 11:42:44 -0000 Daniel Eischen wrote: > Process id's can wrap around so it can eventually happen. > > This is a bug in the application; the implementation is allowed > to reuse thread id's and there are enough interfaces for an > application to tell when a thread terminates (pthread_join). > > Perhaps our use of thread id's could be changes so that they > were cached at the end of the free thread list, but cacheing > them at the front seems to highlight bad applications, so > that's a bonus ;-) So's not explicitly protecting dlopen(), and so's not forcing rescheduling of the thread that was running at preemption time, when returning from an involuntary preemption. ;^). If you're willing to hack around these two, why not the thread ID as well? 8-) 8-). -- Terry