Uptime starts with one second

Jason Hellenthal jhellenthal at dataix.net
Wed Apr 1 07:32:33 UTC 2015


-----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 at 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 at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

_______________________________________________
freebsd-hackers at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

- -- 
 Jason Hellenthal
 Mobile: +1 (616) 953-0176
 jhellenthal at 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-----


More information about the freebsd-hackers mailing list