Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751524Ab0LZHEY (ORCPT ); Sun, 26 Dec 2010 02:04:24 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:63996 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750746Ab0LZHEX (ORCPT ); Sun, 26 Dec 2010 02:04:23 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=NsEYKaAmZMKLGUqojPvD0Iu/+mLAvmC4GREuUtK5PhQDDkz21S4YWTEKiZZmM5cWjX LVhvHzYPMZa1rUtSB2KZW3QxRw0BArRR0f57TNQl7vPLxkAGG2L8P8qtDK0p1py3ixWe UrJ/JoquQkPc2+DHqOaPgOZ/k0onf6ZJihEcc= MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 26 Dec 2010 15:04:21 +0800 Message-ID: Subject: Re: [PATCH v0] add nano semaphore in kernel From: Hillf Danton To: Rakib Mullick Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1281 Lines: 35 On Sun, Dec 26, 2010 at 2:46 PM, Rakib Mullick wrote: > On Sun, Dec 26, 2010 at 11:13 AM, Hillf Danton wrote: >> Based upon high resolution timer and idea borrowed from semaphore, >> nano semaphore is created. >> >> Nano semaphore provides finer time resolution depending on system >> configuration and capabilities. >> >> Nano semaphore is not to replace semaphore, but used in application >> environments where nano seconds are required. >> >> Three methods, nano_semaphore_try_down, nano_semaphore_down and >> nano_semaphore_up are implemented in a header file, and there is no >> corresponding C file since nano semaphore is not complex. >> > > Above description tells how its done, what it is but its not clear why > we should use it. Can I know why should we use it or its benefits? > The outstanding benefit looks that nano semaphore could be used in cases where callers want to wait not only more than one jiffy, but far less than one jiffy also. thanks Hillf > > thanks, > rakib -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/