From: Ian Jackson Subject: Re: [PATCH 2/3] libxl: ocaml: use int64 for timeval fields in the timeout_register callback Date: Thu, 12 Dec 2013 17:43:12 +0000 Message-ID: <21161.62896.78144.803783@mariner.uk.xensource.com> References: <1386866211-12639-1-git-send-email-rob.hoes@citrix.com> <1386866211-12639-3-git-send-email-rob.hoes@citrix.com> <21161.59304.396688.333495@mariner.uk.xensource.com> <360717C0B01E6345BCBE64B758E22C2D1AC329@AMSPEX01CL03.citrite.net> <21161.59822.56479.935901@mariner.uk.xensource.com> <360717C0B01E6345BCBE64B758E22C2D1AC3C7@AMSPEX01CL03.citrite.net> <21161.61138.126582.556698@mariner.uk.xensource.com> <360717C0B01E6345BCBE64B758E22C2D1AC4E5@AMSPEX01CL03.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <360717C0B01E6345BCBE64B758E22C2D1AC4E5@AMSPEX01CL03.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Rob Hoes Cc: Dave Scott , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Rob Hoes writes ("RE: [PATCH 2/3] libxl: ocaml: use int64 for timeval fields in the timeout_register callback"): > Ian Jackson wrote: > > You mean it has a 64-bit mantissa, or it's 64 bits big (an IEEE > > double) ? > > 64 bits big, according to the IEEE 754 standard (http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html), Well, that's too small for a timeval, which has a 32-bit seconds value (currently using 31 of those bits and heaven help us when we get to 0x80000000) and a ~30-bit nsecs value. > I guess we can probably get away with 32 bits for that one, based on what we know the of the range of possible values. I'd just like to avoid any possible trouble, and didn't think those extra bits would cause too much harm. Right. Ian.