Re: 32 bit overflow in timer

2018-03-06 Thread Martin Stein
El 05/03/18 a las 15:29, Christian Helmuth escribió: > A small remark... > > On Mon, Mar 05, 2018 at 02:49:18PM +0100, Martin Stein wrote: >> For greater timeouts you could use msleep(unsigned) (up to 49 >> days and 17 hours). > > This will not work as msleep(ms) just calls usleep(1000*ms). Oh,

Re: 32 bit overflow in timer

2018-03-05 Thread Christian Helmuth
A small remark... On Mon, Mar 05, 2018 at 02:49:18PM +0100, Martin Stein wrote: > For greater timeouts you could use msleep(unsigned) (up to 49 > days and 17 hours). This will not work as msleep(ms) just calls usleep(1000*ms). -- Christian Helmuth Genode Labs https://www.genode-labs.com/ · htt

Re: 32 bit overflow in timer

2018-03-05 Thread Martin Stein
An addition... El 05/03/18 a las 14:49, Martin Stein escribió: > I printed sizeof(unsigned) (Timer::Connection::usleep takes unsigned), > and it says 4. ... on x86 64 ;) Martin -- Check out the vibrant tech community on

Re: 32 bit overflow in timer

2018-03-05 Thread Martin Stein
Hi Johannes, El 18/02/18 a las 12:01, Johannes Kliemann escribió: > Hi all, > > I noticed a 32 bit overflow in the Timer::Connection sleep functions and > triggers. > Calling usleep or trigger_once with an hour (3 600 000 000 us) works but > calling it with two hours (7 200 000 000 us) causes som

Re: 32 bit overflow in timer

2018-02-27 Thread Bob Stewart
genode-main@lists.sourceforge.net Subject: Re: 32 bit overflow in timer Hi Bob, The long is not necessarily defined as 4 bytes. I have checked the GNU reference manual [1] and it states > The 32-bit unsigned long int data type can hold integer values in the range > of at least 0 to 4,294,967,295. (

Re: 32 bit overflow in timer

2018-02-27 Thread Johannes Kliemann
Hi Bob, The long is not necessarily defined as 4 bytes. I have checked the GNU reference manual [1] and it states > The 32-bit unsigned long int data type can hold integer values in the range > of at least 0 to 4,294,967,295. (Depending on your system, this data type > might be 64-bit, in which

Re: 32 bit overflow in timer

2018-02-18 Thread Bob Stewart
Johannes, Unsigned longs are 4 bytes. Unsigned long longs are 8 bytes. One byte equals 8 bits. Bob Stewart Get Outlook for Android From: Johannes Kliemann Sent: Sunday, February 18, 2018 6:01:36 AM To: Genode OS Framework Mailing List S