From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 15 20:02:23 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCD3B16A4CE for ; Tue, 15 Mar 2005 20:02:23 +0000 (GMT) Received: from smtpout-1.priv.cc.uic.edu (smtpout-1.cc.uic.edu [128.248.155.232]) by mx1.FreeBSD.org (Postfix) with SMTP id 12FFF43D2D for ; Tue, 15 Mar 2005 20:02:23 +0000 (GMT) (envelope-from zholla1@uic.edu) Received: (qmail 23466 invoked from network); 15 Mar 2005 14:02:15 -0600 Received: from icarus.cc.uic.edu (128.248.155.80) by smtpout-1.cc.uic.edu with SMTP; 15 Mar 2005 14:02:15 -0600 Date: Tue, 15 Mar 2005 14:02:15 -0600 (CST) From: Zera William Holladay X-X-Sender: zholla1@icarus.cc.uic.edu To: "Michael C. Shultz" In-Reply-To: <200503151135.53269.ringworm01@gmail.com> Message-ID: References: <200503151135.53269.ringworm01@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: threads question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2005 20:02:23 -0000 On Tue, 15 Mar 2005, Michael C. Shultz wrote: [cut] > The answer is probably something like what you just said, scope being > lost when making the call to a shared library. Why is it ok going to a > static library but not a shared though? There is probably a race condition, so your code will work *some* of the time unless you prevent the race condition. I don't have an answer to your question, but I don't think it is a valid question. The scope of "*priority" can remain valid or invalid for random reasons and thus may work some of the time, but the only way to guarantee that it works all the time is to eliminate the race condition by making sure that *property is valid though the life of the thread. -Zera