From owner-freebsd-threads@FreeBSD.ORG Sun Apr 27 17:08:12 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 222A537B401; Sun, 27 Apr 2003 17:08:12 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6A8A43F3F; Sun, 27 Apr 2003 17:08:11 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from tiger (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h3S087Up077820; Sun, 27 Apr 2003 17:08:08 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <007401c30d1a$da3d7f40$0701a8c0@tiger> From: "David Xu" To: "Daniel Eischen" , "David Xu" References: Date: Mon, 28 Apr 2003 08:12:24 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 cc: freebsd-threads@freebsd.org Subject: Re: pthread_join X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Xu List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2003 00:08:12 -0000 In thr_cleanup(), joinee accesses joiner without holding joiner's sched = lock, it is possible when joinee accesses joiner, the joiner may disappear = (canceled). if ((joiner->state =3D=3D PS_JOIN) && (joiner->join_status.thread =3D=3D thread)) { joiner->join_status.thread =3D NULL; David Xu ----- Original Message -----=20 From: "Daniel Eischen" To: "David Xu" Cc: Sent: Sunday, April 27, 2003 11:02 PM Subject: Re: pthread_join > On Sun, 27 Apr 2003, David Xu wrote: > > I found I can not get the following race fixed: > > Thread A is a joiner of thread B, thread C calls pthread_cancel on = A, > > because of multipile scheduler locks, I can not get the race fixed. = > > Is it possible we just use a single scheduler lock to simplify = things a bit? >=20 > Hmm, you mean if thread A is already joined on B? I don't see the > race. Everything looks right. We don't take multiple scheduling > locks at the same time, so everything should work. >=20 > --=20 > Dan Eischen >=20 > _______________________________________________ > 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" >=20