From owner-freebsd-stable@freebsd.org Thu Jul 23 13:51:52 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 794FA9A7EB6 for ; Thu, 23 Jul 2015 13:51:52 +0000 (UTC) (envelope-from allbery.b@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21D411EBF for ; Thu, 23 Jul 2015 13:51:52 +0000 (UTC) (envelope-from allbery.b@gmail.com) Received: by wibxm9 with SMTP id xm9so209525386wib.0 for ; Thu, 23 Jul 2015 06:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=o7lbawWbJEztWx0GWP0h27l56gw2cxBNIQ6Vjt5EYK4=; b=S0B9vFQt6hCjYkrmKXRqssSR4J63AJKh/a4eF2OazxULdQIQNBxOoZZAQa1iaT4jik rngSgnI1NmfhN4wf1tYIguSWs7TOClCr93XUogo5N8qED/4oNBpVf4jFw9FNF7Xi5KIJ GjStdZzHg/t/m+DdnrTPTLZUYMI1gSqFPsdTbxHvZ4ojaTttXV1IwotRoaDwUrzX/bx1 aRu48Rgy7pzfty0MOrtejahtENeVQJp+FOfrbR24xOAEO6DQj1UhRzHm/Ep4hnscoWU0 qqXd+/A5VMLMnVVOa4tiK9Z5WZjzvhurHWrgXk07mlFSiMgYKKxEJBH7x0hSe6l+GKF0 NnQg== MIME-Version: 1.0 X-Received: by 10.180.94.7 with SMTP id cy7mr16296975wib.79.1437659510497; Thu, 23 Jul 2015 06:51:50 -0700 (PDT) Received: by 10.27.133.84 with HTTP; Thu, 23 Jul 2015 06:51:50 -0700 (PDT) In-Reply-To: <464641437658995@web16j.yandex.ru> References: <464641437658995@web16j.yandex.ru> Date: Thu, 23 Jul 2015 09:51:50 -0400 Message-ID: Subject: Re: struct timehands: th_generation field From: Brandon Allbery To: deco33000@yandex.com Cc: freebsd-stable Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2015 13:51:52 -0000 On Thu, Jul 23, 2015 at 9:43 AM, wrote: > I am struggling on one field of a struct : > http://fxr.watson.org/fxr/source/kern/kern_tc.c?v=FREEBSD10#L63 > I would like to understand what th_generation means please. > Seems to me you get a clue from: ( http://fxr.watson.org/fxr/source/kern/kern_tc.c?v=FREEBSD10#L192) */*** * Functions for reading the time. We have to loop until we are sure that** * the timehands that we operated on was not updated under our feet. See** * the comment in for a description of these 12 functions.** */* > > #ifdef FFCLOCK > voidfbclock_binuptime (struct bintime *bt ) > { > struct timehands *th; > unsigned int gen ; > > do { > th = timehands ; > gen = th->th_generation; > *bt = th->th_offset; > bintime_addx (bt , th->th_scale * tc_delta (th)); > } while (gen == 0 || gen != th->th_generation); > } > > -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net