Date: Wed, 1 Apr 2015 02:32:30 -0500 From: Jason Hellenthal <jhellenthal@dataix.net> To: Sebastian Huber <sebastian.huber@embedded-brains.de> Cc: freebsd-hackers@freebsd.org Subject: Re: Uptime starts with one second Message-ID: <516B61EB-173D-44D8-B199-44E915738EF3@dataix.net> In-Reply-To: <551B9531.4040902@embedded-brains.de> References: <551B9531.4040902@embedded-brains.de>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Just a brief exploration of the source and a quick test, I yield no seen negative results… as of yet but changes are very minimal to a current updated 10-STABLE and have not tracked further if more may be needed. Index: sys/kern/kern_tc.c =================================================================== - --- sys/kern/kern_tc.c (revision 280928) +++ sys/kern/kern_tc.c (working copy) @@ -105,7 +105,7 @@ int tc_min_ticktock_freq = 1; volatile time_t time_second = 1; - -volatile time_t time_uptime = 1; +volatile time_t time_uptime = 0; struct bintime boottimebin; struct timeval boottime; On Apr 1, 2015, at 01:50, Sebastian Huber <sebastian.huber@embedded-brains.de> wrote: Hello, we port currently the FreeBSD timecounters to the RTEMS real-time operating system. https://devel.rtems.org/ticket/2271 On FreeBSD the uptime starts with one second. On RTEMS the uptime starts with zero seconds. I would like to preserve the existing behaviour and it would be easy to adjust kern_tc.c accordingly. The problem is that we also use the FreeBSD network stack and it uses for example (microuptime()). Has a uptime value of zero a special meaning inside the kernel so that we must not start at zero? - -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" - -- Jason Hellenthal Mobile: +1 (616) 953-0176 jhellenthal@DataIX.net JJH48-ARIN -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJVG58OAAoJEDLu+wRc4KcI+CUIAMZnulwHBIg497IVyI+wK47Y Hz3eaebuI0IxVadfFcRZMXgGNN30bSVkxN9BVQzcJ9FOOAYb1O3AyJNYWLJw1dA6 ilyF6jCV+uOtuXfBdxch/3ZzSHP4wtMO1JzL2YgG0KzQW71DsXnFlXE3mNveFQx8 QNHpsHNOMPdC4pyq/Ew6ltiBELzIa7LJqcPdnjh4cSzxVnVlihjta41FhbDh4+bO 7m087eXH8AuRUdK5sGOBRB26hgOB1iJhis2YwFucdlAytUfE26eFDJtbS8NOMSOo fiViLMcE1nsEXIdorg7o5vRIUzakFGfcqJlXxdmAGUGZ52B6E2jaDTN/0wnGVh8= =xYyK -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?516B61EB-173D-44D8-B199-44E915738EF3>