Commit Graph

38 Commits

Author SHA1 Message Date
Gregory Nutt d5207efb5a Be consistent... Use Name: consistent in function headers vs Function: 2017-04-21 16:33:14 -06:00
Jussi Kivilinna c57d49f420 clock: Add new type ssystime_t for relative 64-bit ticks, change ticks<->time conversion functions to use ssystime_t 2017-04-21 08:51:31 -06:00
Jussi Kivilinna 325ba1a803 clock: add clock_resynchronize and use subseconds RTC
Add clock_resynchronize for better synchronization of CLOCK_REALTIME and CLOCK_MONOTONIC to match RTC after resume from low-power state.

Add up_rtc_getdatetime_with_subseconds under CONFIG_ARCH_HAVE_RTC_SUBSECONDS to allow initializing (and resynchronizing) system clock with subseconds accuracy RTC.
2017-04-21 08:45:57 -06:00
Gregory Nutt 300361539a sched/sched_cpuload_oneshot: Use the oneshot timer with optional entropy to measuer cPU load if so configured. 2016-08-20 12:47:07 -06:00
Gregory Nutt 469aff0584 Fix names of pre-processor variables used in header file idempotence 2016-08-06 19:21:42 -06:00
Stefan Kolb fde277a388 Missing parentheses in MSEC2TICK macro can lead to incorrect conversions 2016-03-09 07:24:16 -06:00
Gregory Nutt dea24c503a Networking: Remove the HSEC argument from devif_timer. 2016-02-03 12:12:41 -06:00
Gregory Nutt 84d4cb007b clock_systimer: 64-bit timer accesses are not atomic. Noted by Freddie Chopin. 2016-01-22 12:24:36 -06:00
Gregory Nutt 032ad1b70b Remove clock_systimer32 and clock_systimer64. There is now only clock_systimer 2016-01-21 16:49:24 -06:00
Gregory Nutt f348e68069 Update to use 64-bit timer when available 2016-01-21 11:54:26 -06:00
Dimitry Kloper 06438b0dcc Fix 64-bit clock-related constant value evaluation for AVR compiler
This may be specific for Atmel AVR8 toolchain compiler.
The problem is that despite of being 8-bit architecture
avr-gcc supports uint64_t, but the following code

uint64_t value = 10000 * 1000;

produces a wrong negative value in the final code (tested
both with and without optimization).

The work-around is simple:

uint64_t value = 10000 * 1000L;

The code is a reduced part from sched/signal/sig_timedwait.c where
waitticks64 is calculated using NSEC_PER_TICK. This one is defined
as USEC_PER_TICK * NSEC_PER_USEC which leads to the example above.
2016-01-05 12:02:02 -06:00
Gregory Nutt fc7bd31e07 last change alters semantics of __HAVE_KERNEL_GLOBALS 2014-08-30 14:44:48 -06:00
Gregory Nutt 2029236ed0 Back out and replace recent kludges for errno and clock_systimer. There is a cleaner way 2014-08-30 14:26:56 -06:00
Gregory Nutt e3ff0689bb Rename CONFIG_NUTTX_KERNEL to CONFIG_BUILD_PROTECTED; Partially integrate new CONFIG_BUILD_KERNEL 2014-08-29 14:47:22 -06:00
Gregory Nutt fe35751ec2 g_system_timer must be handler in a special way if there are external modules 2014-08-28 17:02:53 -06:00
Gregory Nutt eed1d6c619 When reading the system timer, don't read a struct timespec, convert it to a fake tick count, then back to a timespec. Remove CLOCK_ACTIVETIME.. it is non-standard, unused, and gets in the way of changes like this 2014-08-15 03:55:41 -06:00
Gregory Nutt 6e0acd7cd4 WM8904: Don't use MSEC2TICK in timeout calculation 2014-08-08 11:02:45 -06:00
Gregory Nutt 5ee57bda59 Some final tickless OS bugfixes. No longer EXPERIMENTAL. Update some comments 2014-08-07 19:11:22 -06:00
Gregory Nutt c9661ad5a7 Change all time conversions. Yech. New timer units in microseconds breaks all existing logic that used milliseconds in the conversions. Something likely got broken doing this, probably because I confused a MSEC2TICK conversion with a TICK2MSEC conversion. Also, the tickless OS no appears fully functional and passes the OS test on the simulator with no errors 2014-08-07 18:00:38 -06:00
Gregory Nutt 0aa7209765 Change CONFIG_MSEC_PER_TICK to CONFIG_USEC_PER_TICK. This gives more options for system timers in general, but more importantly, let's us realize higher resolution for the case of CONFIG_SCHED_TICKLESS=y -- of course, at the risk of some new interger overvflow problems 2014-08-07 13:42:47 -06:00
Gregory Nutt caba61999a Remove CONFIG_DISABLE_CLOCK 2014-08-07 12:35:24 -06:00
Gregory Nutt 0452b1555b if CONFIG_SCHED_TICKLESS is defined, then the global variable g_system_timer does not exist 2014-08-06 18:26:16 -06:00
Gregory Nutt cf4a362ab5 CPU load calculations now available for all threads. Available in /proc/pid/loadavg 2014-02-23 10:55:01 -06:00
Gregory Nutt 59769d44f1 Add logic to meaure and calculate the CPU load percentage. From David Alessio 2014-02-22 15:20:12 -06:00
patacongo 869c3fa50b Fixes for l3s, USB composite, nfsmount, apps context build problems
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5458 42af7a65-404d-4744-a932-0658087f49c3
2012-12-24 17:49:58 +00:00
patacongo f2df8af310 Add clock_synchronize() which may be used to re-synchonize the system time with an RTC after recovering from a low power state
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4503 42af7a65-404d-4744-a932-0658087f49c3
2012-03-22 14:52:46 +00:00
patacongo d8c4138e74 Remove support for UTC time; add support for 64-bit time
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4006 42af7a65-404d-4744-a932-0658087f49c3
2011-10-02 14:16:30 +00:00
patacongo 3f4af2fe30 Add support for lo- and hi-res RTC hardware
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4005 42af7a65-404d-4744-a932-0658087f49c3
2011-10-01 22:09:00 +00:00
patacongo 9ecda2e9fa More timer changes from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3572 42af7a65-404d-4744-a932-0658087f49c3
2011-05-06 21:10:00 +00:00
patacongo 12f3097882 Rename uptime to UTC
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3528 42af7a65-404d-4744-a932-0658087f49c3
2011-04-20 14:12:52 +00:00
patacongo 9076917379 More changes from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3513 42af7a65-404d-4744-a932-0658087f49c3
2011-04-16 13:00:57 +00:00
patacongo c1c80a723b Add code changes from Uros
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3507 42af7a65-404d-4744-a932-0658087f49c3
2011-04-15 16:20:25 +00:00
patacongo 32e6941ed7 Add time and uptime
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3506 42af7a65-404d-4744-a932-0658087f49c3
2011-04-15 14:57:53 +00:00
patacongo 10538a3f2e Macro clock_systimer replaces direct access to g_system_timer variable
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3500 42af7a65-404d-4744-a932-0658087f49c3
2011-04-13 21:44:24 +00:00
patacongo c80fb6cbcf LPCXpression console on UART3
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3497 42af7a65-404d-4744-a932-0658087f49c3
2011-04-13 03:12:51 +00:00
patacongo eeec4073a9 Switching to C99 stdint.h types
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2340 42af7a65-404d-4744-a932-0658087f49c3
2009-12-14 23:32:23 +00:00
patacongo 4dd12b73af Add NSH ping command
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@870 42af7a65-404d-4744-a932-0658087f49c3
2008-09-02 23:04:10 +00:00
patacongo 01207cc66e Added network init; refactored some header files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@338 42af7a65-404d-4744-a932-0658087f49c3
2007-09-09 11:58:50 +00:00