summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/todimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* _TOD_Adjust method is unused. Remove it.Joel Sherrill2023-05-161-15/+0
| | | | | | | Use of this method was likely eliminated during the rework to use FreeBSD bintime/sbintime. Close #4905.
* Do not use RTEMS_INLINE_ROUTINESebastian Huber2022-09-191-2/+2
| | | | | | | Directly use "static inline" which is available in C99 and later. This brings the RTEMS implementation closer to standard C. Close #3935.
* cpukit/include/rtems/score/[s-z]*.h: Change license to BSD-2Joel Sherrill2022-02-281-3/+22
| | | | Updates #3053.
* score: Change TOD_LATEST_YEAR to 2099Sebastian Huber2021-09-061-2/+29
| | | | | | | | This simplifies the implementation a bit. Declare _TOD_Days_to_date[] in <rtems/score/todimpl.h>. Make _TOD_Days_per_month[] and _TOD_Days_since_last_leap_year[] static. Update #4338.
* score: Limit the CLOCK_REALTIME settingSebastian Huber2021-09-061-0/+9
| | | | | Limit the CLOCK_REALTIME setting to ensure that the CLOCK_REALTIME is defined for a system uptime of at least 114 years.
* score: Add _TOD_Is_valid_new_time_of_day()Sebastian Huber2021-09-061-1/+13
| | | | | | Move the TOD validation to the callers of _TOD_Set(). This avoids dead code in case only rtems_clock_set() is used in an application because rtems_clock_set() always calls _TOD_Set() with a valid time of day.
* score: Remove TOD_TICKS_PER_SECOND_method()Sebastian Huber2021-09-061-18/+2
| | | | Use _Watchdog_Ticks_per_second instead.
* score: Return status in _TOD_Adjust()Sebastian Huber2021-09-061-1/+4
|
* clock:_TOD_To_seconds(): Fix year 2514 overflowFrank Kühndel2021-04-211-0/+16
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes issue #4338 by changing _TOD_Validate() to only accept years till 2105. This requires another patch to change the documentation of rtems_clock_set() and other affected API functions (indicating the end date is 2105 not 2514). I tried to support till year 2514 but it turned out that this needs changing the Timer Manager too. That in turn would mean to change _TOD_Seconds_since_epoch( void ) from 32 to 64 bit. Sebastian pointed out that a naive extension leads to trouble with 32 bit processors. He deemed a safe re-implementation too costly performance wise considering that year 2106 is far away and current binaries using RTEMS Classic API are unlikely to be in use by 2106. The constant TOD_SECONDS_AT_2100_03_01_00_00 in cpukit/rtems/src/clocktodtoseconds.c happens to be wrong by 1 hour. When setting the date 2100-Feb-28 23:59:59 and then reading the date again you will find yourself in 2100-Feb-27. Update #4338
* score: Canonicalize Doxygen @file commentsSebastian Huber2020-12-021-1/+3
| | | | | | Use common phrases for the file brief descriptions. Update #3706.
* score: Canonicalize Doxygen groupsSebastian Huber2020-12-021-2/+3
| | | | | | | Adjust group identifier and names to be in line with a common pattern. Use common phrases for the group brief descriptions. Update #3706.
* score: Return status in _TOD_Set()Sebastian Huber2020-04-141-15/+10
| | | | Update #3949.
* Add TOD Hooks to allow BSP to take action when TOD is setJoel Sherrill2019-12-111-1/+106
| | | | | | | | | | | | Two use cases were envisioned for this. 1) a BSP or application which desires to update a real-time clock when the RTEMS TOD is set. 2) a paravirtualized BSP can use this to propagate setting the time in an RTEMS application to the hosting environment. This enables the entire set of applications in the virtualized environments to have a single consistent TOD.
* doxygen: score: adjust doc in todimpl.h to doxygen guidelinesAndreas Dachsberger2019-05-131-35/+62
| | | | Update #3706.
* doxygen: Rename Score* groups in RTEMSScore*Sebastian Huber2019-04-041-4/+4
| | | | Update #3706
* doxygen: Reviewed cpukit/include/rtems/scoreAndreas Dachsberger2019-04-021-3/+1
| | | | Update #3706.
* score: Remove empty <rtems/score/tod.h>Sebastian Huber2018-11-121-1/+0
| | | | Update #3598.
* Remove make preinstallChris Johns2018-01-251-0/+304
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.