From owner-freebsd-threads@FreeBSD.ORG Wed Jun 4 14:08:14 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 69B7E37B401 for ; Wed, 4 Jun 2003 14:08:14 -0700 (PDT) Received: from matou.sibbald.com (matou.sibbald.com [195.202.201.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9902043FBD for ; Wed, 4 Jun 2003 14:08:10 -0700 (PDT) (envelope-from kern@sibbald.com) Received: from [192.168.68.112] (rufus [192.168.68.112]) by matou.sibbald.com (8.11.6/8.11.6) with ESMTP id h54L7Pv16017; Wed, 4 Jun 2003 23:07:25 +0200 From: Kern Sibbald To: Julian Elischer In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1054760845.13630.568.camel@rufus> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 04 Jun 2003 23:07:25 +0200 Content-Transfer-Encoding: 7bit cc: Daniel Eischen 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: Wed, 04 Jun 2003 21:08:14 -0000 I like that word "robustness" :-) On Wed, 2003-06-04 at 22:20, Julian Elischer wrote: > On Wed, 4 Jun 2003, Julian Elischer wrote: > > > in fact The first paragraph of: > > uh, not the first parageaph.. the paragraph marked "Thread IDs" > (didn't notice the page was scrolled up a bit) > > > > > http://www.opengroup.org/onlinepubs/007904975/toc.htm > > > > States this.. > > > > > > On Wed, 4 Jun 2003, Julian Elischer wrote: > > > > > > > > > > > On Wed, 4 Jun 2003, Jeff Roberson wrote: > > > > > > > On 4 Jun 2003, Kern Sibbald wrote: > > > > > > > > > > > > > > I'm not sure what the POSIX specification says, > > > > > if I were programming it, I would not be content > > > > > with the FreeBSD current implementation especially > > > > > considering that both Solaris and Linux do it "correctly". > > > > > > > > Would you rather your application failed immediately, or in a subtle, > > > > unexpected way after many hours/weeks/months of run time? Dan says the > > > > standard allows for immediate reuse. If that is correct, then Solaris, > > > > linux, and FreeBSD all do it correctly for the only definition of > > > > correctly that matters. > > > > > > > > Simply adding an ID is problematic because the ids will wrap. Without > > > > using some deterministic notification you can't be sure that it isn't an > > > > expired thread. > > > > > > > > > I will quote from "Programming with Posix threads" > > > by David R Butenhof.. > > > He is one o fthe main authors of the Posix threads standard so > > > I tend to treat this book as a guide.. > > > > > > "Once a thread is recycled, the thread's ID (pthread_t) is no longer > > > valid. You cannot join with the thread, canel it, or anything else. The > > > terminated thread's ID (which may be the addess of a system data > > > structure) may be assigned to a new thread. Instead of receiving an > > > ESRCH failure from your call to pthread_cancel, you would instead cancel > > > a different thread." > > > > > > I think that is pretty explicit as far as expected bahaviour. > > > > > > HAVING SAID THAT, it is not impossible that at some time in the future > > > we may use some other pthread_t type, e.g an incrementing TID, > > > but at this time I think we are well within the standard... > > > > > > > > > Julian > > > > > > > > > _______________________________________________ > > > freebsd-threads@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > > > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" > > > > > > > _______________________________________________ > > freebsd-threads@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" > >