From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 17 20:07:35 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 5EA4316A425 for ; Sat, 17 Dec 2005 20:07:35 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD94243D95 for ; Sat, 17 Dec 2005 20:07:03 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by zproxy.gmail.com with SMTP id z6so943710nzd for ; Sat, 17 Dec 2005 12:07:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=sqtH9ZAaWnjFFRyaJ24K/a4of8J8ItQynXcwaolPvz8eASUlW6ZHxHhisi2CK+Uy/TQyuRe80dCLgyB6YWI3kUkRjriWF/yrFH4BqKVBSkOzQx7KIQRIUbvryxpMZa/UzGdQINyclUJVFp7/7qm4S9u48DxUtnnqIlggFqzsCRM= Received: by 10.37.18.66 with SMTP id v66mr4340550nzi; Sat, 17 Dec 2005 12:07:03 -0800 (PST) Received: by 10.36.43.18 with HTTP; Sat, 17 Dec 2005 12:07:02 -0800 (PST) Message-ID: <3bbf2fe10512171207n41c9308dm@mail.gmail.com> Date: Sat, 17 Dec 2005 21:07:02 +0100 From: rookie To: prime In-Reply-To: <1fa17f810512170027h58ccadbcq9f8d3187f35a2ddd@mail.gmail.com> MIME-Version: 1.0 References: <1fa17f810512170027h58ccadbcq9f8d3187f35a2ddd@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Puzzled about turnstile's lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rookie@gufi.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Dec 2005 20:07:35 -0000 > Hi hackers, > I want to understand the current implementation of > turnstile,and meet some questions about its locks' logicality. [snip] It's used to lock td_contested member of struct thread structure and all issues linked to it (as you can see in the source tree). It seems used in a clean way. Attilio turnstile's ``ts_blocked" field is protected by both > ``td_contested" lock and its turnstile_chain lock, but > I think its turnstile_chain lock is enough,because we > allways get the turnstile_chain lock before our manipulation > on ``ts_blocked". > If td_contested lock were needed ,reading ts_blocked is > not protected by td_contested lock,in the kernel source, why? > > Thanks. > -- > Three passions, simple but overwhelmingly strong, have governed my life: > the longing for love, the search for knowledge, and unbearable pity for > the suffering of mankind. > ---------Bertrand Russell > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > -- Peace can only be achieved by understanding - A. Einstein