From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 30 06:09:23 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7882DB10 for ; Mon, 30 Sep 2013 06:09:23 +0000 (UTC) (envelope-from hoomanfazaeli@gmail.com) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 06AB22C5E for ; Mon, 30 Sep 2013 06:09:22 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id w6so4058347lbh.19 for ; Sun, 29 Sep 2013 23:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=jrhJbY5KVv55J2/+xAgbT3caxAozm4dlcdWQZtZPqW8=; b=pycf9ubD+MDwjxGl8OH0A1jv6HeP9I9xvsWSS1CJFiQmDWM1BxI5psAeiB880az6uf hBKxc1XgAZZGSr8SmsHnRWG6o3IhwMtqCSlWu7UWmkSxbw2EX19U8bncAEEhl4WVsZFc J8GH10LG+kgdUBAphybGeja3UE5VTHVetdSs9S1yn5pfvZSP82NuHDtzlhwl5jx7c6fO GcdHtPI7CCO4BcsX4WIVagh0tNKxdEyUmVBUWvtq99RSxKYYbPmyzY/k6vjeCJ0AEpvt eEcPBPt/CFQuaz7LnTSF7EfbA8NPPAVB5NxOPuNRCYbKxo4Fs+X+xlux/f8swQzrEOSV JD4g== X-Received: by 10.112.52.161 with SMTP id u1mr24702lbo.49.1380521361059; Sun, 29 Sep 2013 23:09:21 -0700 (PDT) Received: from [192.168.2.30] ([2.176.227.160]) by mx.google.com with ESMTPSA id ur6sm14721229lbc.5.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Sep 2013 23:09:20 -0700 (PDT) Message-ID: <5249158D.5010101@gmail.com> Date: Mon, 30 Sep 2013 09:39:17 +0330 From: Hooman Fazaeli User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: FreeBSD Hackers Subject: rwlock(9) upgrade Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2013 06:09:23 -0000 Hi, For rwlock(9), there is no rwlock_upgrade function. Is it safe to use rw_wlock() for that purpose? In other words, Does calling rw_wlock() upgradeanalready r-locked lock? -- Best regards. Hooman Fazaeli