summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/kern_tc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Avoid clash with <strings.h> provided fls()Sebastian Huber2017-07-051-1/+2
|
* Provide kernel space header filesSebastian Huber2016-11-081-0/+1
| | | | | These kernel space header files must be provided for Newlib 172e2050d95b41861db858dd9bc43a3fb4a28987.
* score: Avoid Giant lock for set time of daySebastian Huber2016-05-021-19/+28
| | | | | Update #2555. Update #2630.
* score: Compatibility with latest NewlibSebastian Huber2016-04-081-18/+18
|
* timecounter: Avoid invalid memcpy()Sebastian Huber2016-03-161-0/+8
| | | | | In uni-processor configurations we have only one timehand. Do not issue a memcpy() with equal source and destination.
* score: Replace watchdog handler implementationSebastian Huber2016-03-041-1/+2
| | | | | | | | | Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
* score: Distribute clock tick to all online CPUsSebastian Huber2016-03-041-2/+7
| | | | Update #2554.
* score: Fix simple timecounter supportSebastian Huber2016-01-191-8/+8
| | | | Update #2502.
* score: Statically initialize TOD handlerSebastian Huber2016-01-121-11/+16
|
* score: Avoid dependency on bcopy()Sebastian Huber2015-12-151-0/+1
|
* Revert "timecounter: No _Timecounter_Tick_simple() for SMP"Sebastian Huber2015-06-111-6/+0
| | | | | | | | | This reverts commit 46ae1d7a2b49b8f973dd6ba44fbbd38383798524. The _Timecounter_Tick_simple() function actually doesn't switch to the next timehand, so it is all right to use the simple timecounter approach even on SMP configurations. The use of simple timecounters is not recommended however since they impose a performance penalty.
* timecounter: No _Timecounter_Tick_simple() for SMPSebastian Huber2015-06-091-0/+6
|
* timecounter: Synchronize with FreeBSDkib2015-06-091-42/+82
| | | | | | | | | | | | | | | | When updating/accessing the timehands, barriers are needed to ensure that: - th_generation update is visible after the parameters update is visible; - the read of parameters is not reordered before initial read of th_generation. On UP kernels, compiler barriers are enough. For SMP machines, CPU barriers must be used too, as was confirmed by submitter by testing on the Freescale T4240 platform with 24 PowerPC processors. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> MFC after: 1 week
* timecounter: Synchronize with FreeBSDian2015-06-091-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a mechanism for making changes in the kernel<->driver PPS interface without breaking ABI or API compatibility with existing drivers. The existing data structures used to communicate between the kernel and driver portions of PPS processing contain no spare/padding fields and no flags field or other straightforward mechanism for communicating changes in the structures or behaviors of the code. This makes it difficult to MFC new features added to the PPS facility. ABI compatibility is important; out-of-tree drivers in module form are known to exist. (Note that the existing api_version field in the pps_params structure must contain the value mandated by RFC 2783 and any RFCs that come along after.) These changes introduce a pair of abi-version fields which are filled in by the driver and the kernel respectively to indicate the interface version. The driver sets its version field before calling the new pps_init_abi() function. That lets the kernel know how much of the pps_state structure is understood by the driver and it can avoid using newer fields at the end of the structure that it knows about if the driver is a lower version. The kernel fills in its version field during the init call, letting the driver know what features and data the kernel supports. To implement the new version information in a way that is backwards compatible with code from before these changes, the high bit of the lightly-used 'kcmode' field is repurposed as a flag bit that indicates the driver is aware of the abi versioning scheme. Basically if this bit is clear that indicates a "version 0" driver and if it is set the driver_abi field indicates the version. These changes also move the recently-added 'mtx' field of pps_state from the middle to the end of the structure, and make the kernel code that uses this field conditional on the driver being abi version 1 or higher. It changes the only driver currently supplying the mtx field, usb_serial, to use pps_init_abi(). Reviewed by: hselasky@
* timecounter: Synchronize with FreeBSDian2015-06-091-9/+10
| | | | Use sbuf_printf() for sysctl strings instead of stack buffers and snprintf().
* timecounter: Synchronize with FreeBSDhselasky2015-06-091-8/+6
| | | | | | | | Add mutex support to the pps_ioctl() API in the kernel. Bump kernel version to reflect structure change. PR: 196897 MFC after: 1 week
* timecounter: Use in RTEMSAlexander Krutwig2015-05-201-0/+6
| | | | | | | | Replace timestamp implementation with FreeBSD bintime and timecounters. New test sptests/sptimecounter02. Update #2271.
* timecounter: Port to RTEMSAlexander Krutwig2015-05-201-0/+171
| | | | | | New test sptests/timecounter01. Update #2271.
* timecounter: Honor FFCLOCK defineAlexander Krutwig2015-05-191-0/+4
| | | | Update #2271.
* timecounter: Use uint32_t instead of u_intAlexander Krutwig2015-05-191-17/+17
| | | | | | | FreeBSD assumes that u_int is a 32-bit integer type. This is wrong for some 16-bit targets supported by RTEMS. Update #2271.
* timecounter: Import from FreeBSDAlexander Krutwig2015-05-191-0/+2039
Update #2271.