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
2de5be34e5
Update ChangeLog
2016-01-21 19:29:43 -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
b04e2ea021
Trivial improvement to comments
2016-01-21 16:28:36 -06:00
Gregory Nutt
a4f5254cbe
Fix a typo introduced into the last commit
2016-01-21 13:48:35 -06:00
Gregory Nutt
e001f37593
sched/clock/clock_timespec.c: Fix an error in the time conversion
2016-01-21 13:31:00 -06:00
Gregory Nutt
f348e68069
Update to use 64-bit timer when available
2016-01-21 11:54:26 -06:00
Gregory Nutt
a2e1ece873
RTC: Handle RTC failures. If mktime is called with garbage, it may crash
2015-12-21 14:39:40 -06:00
Gregory Nutt
4b29bcee7f
Rename up_rtcinitialize to up_rtc_initialize so that it looks like other RTC interfaces
2015-11-20 08:27:52 -06:00
Gregory Nutt
892ba4f26a
DS1307: Change year bias to 1968 which is a leap year juse like 2000
2015-11-19 15:12:40 -06:00
Gregory Nutt
c34b5108a7
RTC: Fix system time initialization when using an exernal RTC. Fix some bugs in the DS1307/DS3231 RTC driver
2015-11-19 14:54:30 -06:00
Lok
da8950fe5b
Fix an error in clock_timespec_subtract
2015-11-03 07:28:46 -06:00
Gregory Nutt
79d554939e
sched/: Fix some spacing issues
2015-10-07 19:59:14 -06:00
Gregory Nutt
5b51a9fcdd
Standardize the width of all comment boxes in C files
2015-10-02 17:43:18 -06:00
Gregory Nutt
cb9e27c3b0
Standardize naming used for public data and function groupings
2015-10-02 16:30:35 -06:00
Gregory Nutt
99664b7811
Sporadic scheduler: Add logic to collection the partial timer expiration when a sporadic thread is suspended in tickless mode
2015-07-26 15:03:47 -06:00
Max Neklyudov
61af0d511f
Use up_timer_gettime for CLOCK_MONOTONIC in tickless mode. From Max Neklyudov.
2015-06-22 06:37:26 -06:00
Gregory Nutt
16276a4793
Change the order of some operations to prevent a debug assertion from firing.
2015-05-18 06:34:54 -06:00
Gregory Nutt
b4423c1eed
Make some file section headers more consistent with standard
2015-04-08 06:47:36 -06:00
Gregory Nutt
c99d927527
When an RTC is used, clock_systimespec() must subtract the basetime from the RTC time
2015-02-25 07:24:03 -06:00
Gregory Nutt
3724a5e98e
RTC: Remove all backdoor interfaces from rtc.h
2015-02-13 08:41:34 -06:00
Gregory Nutt
d9f960e97b
Fix a problem in clock_systimer64 that occurs when (1) the 64-bit system time is enabled, and (2) the value of CONFIG_USEC_PER_TICK is less than 1 millisconds (such as when using the tickless mode of operation). In that case, the convertion of time to 64-bit millisecond value in clock_systmer64() causes some bad times to be returned. Time was converted to milliseconds, then to configured ticks. Precision was lost in the millisecond convertion.
...
The fix is to first convert time to a 64-bit microsecond value, then to the configured tick value.
Noted by David Sidrane.
2015-02-13 06:13:47 -06:00
Gregory Nutt
147042218b
gettimeofday() and settimeofday(): Move gittimeofdady() from sched/clock to libc/time. All remove gettimeofday() from NuttX system calls. It is only a wrapper around clock_settime() and does not need a trap. gettimeofday() is no longer tried as a core OS interface.
...
gettimeofday has been decremented in POSIX 2008. settimeofday() was never part of POSIX, but I decided to add it to libc as well just for symmetry.
2015-02-12 11:10:46 -06:00
Gregory Nutt
c5ab7c39d3
Eliminates a warning. From Macs N
2015-02-03 06:44:59 -06:00
Gregory Nutt
e69003cbf7
clock_systimespec(): Fixes for compilation errors in certain configurations. From Macs N.
2015-01-30 08:19:40 -06:00
Gregory Nutt
8c28718bcb
alling mq_timedreceived with immediate timeout was getting stuck and not
...
timeout. Immediate timeout is achieved by setting absolute timeout value to
past time, for example abstime={ .tv_sec=0, .tv_nsec=0 }. However absolute
time was converted to relative time using unsigned integer arithmetic and
resulted large ticks count by clock_abstime2ticks, instead of expected negative
ticks value.
Patch corrects clock_abstime2ticks to return negative ticks, if absolute time
is in the past.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@haltian.com>
2014-11-19 09:25:00 -06:00
Gregory Nutt
322f9f401c
Simplify how C source files are selected in the build
2014-10-07 07:42:36 -06:00
Gregory Nutt
da29907ac9
Update TODO list + cosmetic changes to clock_systimer.c
2014-10-03 11:21:35 -06:00
Gregory Nutt
8d43a6bdcd
Fix build error with CONFIG_SYSTEM_TIME64
2014-10-03 10:20:46 -06:00
Gregory Nutt
4a20cd65c5
clock_gettime.c: Fix a cornercase bug in clock_gettime()
2014-09-10 17:10:54 -06:00
Gregory Nutt
c19659d7d2
Fixes to clock bias logic. Remove vestiges of g_tickbias; apply bias instead to g_basetime
2014-09-10 16:36:25 -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
0ab1b0de25
nuttx/sched: Remove explicit references to errno. That is a problem from within the kernel for certain configurations
2014-08-28 17:00:24 -06:00
Gregory Nutt
9ab67dce75
In some configurations, g_system_tmer must be extern'ed as a private variable
2014-08-28 17:00:03 -06:00
Gregory Nutt
27c48a383e
Don't do 64-bit calculations if accuracy not achievable; Fix compile error in high res RTC mode
2014-08-15 17:48:07 -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
d4b56eb3cc
Move clock functions from sched/ to sched/clock
2014-08-08 14:43:02 -06:00