From owner-freebsd-current@FreeBSD.ORG Thu Aug 23 14:52:59 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04489106566C for ; Thu, 23 Aug 2012 14:52:59 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6FC5A8FC08 for ; Thu, 23 Aug 2012 14:52:58 +0000 (UTC) Received: by lbbgg13 with SMTP id gg13so585644lbb.13 for ; Thu, 23 Aug 2012 07:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=0ZRILnbCtFGV6Raw+9mFWY6SFFlZdrpEpJfIgGDy7DA=; b=D9YPZsKCfg748YchE0UxEHBacZkDgSXZupr+tPpggbwZReAgGL+M3h84T4UQjJTIJt 9SUrpytCHeB6cNmoJFu7w8kMic1xR6609PJ3p4Gl3/0ozQ76sga2kmueiv+w2GlzAlfd NblJgIR2hyy5J7BWEhzjOIi9pU41pPMPVIoXjnc6h7Fdjl09rooeHJZ3lqMnaw5mHLna yX+vPYWbPKPqBoG6N8ITdG4nzJSFIHmgHHxrD2T6sQxMWwBKUCg/rarf63kHLP1eZgEr qCp//MjoQXcSKsbidldzJoA4i5bv5zuL27i5Fq5j+txUllmTh+wTtzS0L4OMFnYIHIOZ rXUA== MIME-Version: 1.0 Received: by 10.152.112.233 with SMTP id it9mr2006810lab.40.1345733577004; Thu, 23 Aug 2012 07:52:57 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Thu, 23 Aug 2012 07:52:56 -0700 (PDT) In-Reply-To: <20120823145420.GB3103@onelab2.iet.unipi.it> References: <20120823145420.GB3103@onelab2.iet.unipi.it> Date: Thu, 23 Aug 2012 15:52:56 +0100 X-Google-Sender-Auth: 9uwqOn5XA-TmfJ8yUwW5yUtA090 Message-ID: From: Attilio Rao To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Cc: current@freebsd.org Subject: Re: TUNABLE_INT vs TUNABLE_INT_FETCH X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2012 14:52:59 -0000 On 8/23/12, Luigi Rizzo wrote: > Hi, > I am a bit unclear on what are the pros and cons of using > TUNABLE_INT vs TUNABLE_INT_FETCH within a device driver. TUNABLE_INT is basically the "statically initializer" version of TUNABLE_INT_FETCH. In short terms, you will use TUNABLE_INT_FETCH() in normal functions, while TUNABLE_INT() in data declaration. Attilio -- Peace can only be achieved by understanding - A. Einstein