summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Add _IO_Printf() and _IO_Vprintf()Sebastian Huber2017-11-061-0/+46
| | | | | | | | | | | | | | The previous vprintk() implementation had a questionable licence header, lacks support for the 'z' and 'j' format specifiers, is not robust against invalid format specifiers, uses a global variable for output. Replace it with a stripped down version of the FreeBSD kernel kvprintf() function. The new implementation allows a low overhead rtems_snprintf() if necessary. Update #3199. Close #3216.
* posix: Use far future for very long timeoutsSebastian Huber2017-11-021-0/+30
| | | | Close #3205.
* score: Simplify SMP get lowest scheduledSebastian Huber2017-10-281-7/+4
| | | | | | There is no need to pass in the order relation since the scheduled threads reside on an already ordered chain. The caller will decide what to do with the lowest scheduled thread.
* score: Delete _Scheduler_Thread_set_priority()Sebastian Huber2017-10-261-12/+0
|
* score: Move thread queue timeout handlingSebastian Huber2017-10-246-106/+114
| | | | | Update #3117. Update #3182.
* score: Rename function threadq support functionSebastian Huber2017-10-243-7/+7
| | | | | | | | | Rename _Thread_queue_Context_set_do_nothing_enqueue_callout() into _Thread_queue_Context_set_enqueue_do_nothing_extra(). More _Thread_queue_Context_set_enqueue_*() functions will follow. Update #3117. Update #3182.
* score: Add _Thread_Continue()Sebastian Huber2017-10-241-2/+16
| | | | | Update #3117. Update #3182.
* score: _Watchdog_Per_CPU_lazy_insert_monotonic()Sebastian Huber2017-10-241-0/+25
| | | | | Update #3117. Update #3182.
* score: Add _Watchdog_Monotonic_from_timespec()Sebastian Huber2017-10-241-0/+16
| | | | | Update #3117. Update #3182.
* score: Add _Watchdog_Nanoseconds_per_tickSebastian Huber2017-10-241-0/+8
| | | | | | | Move it from the configuration to a separate variable. Update #3117. Update #3182.
* score: _Watchdog_Is_far_future_monotonic_timespecSebastian Huber2017-10-242-0/+16
| | | | | Update #3117. Update #3182.
* score: Add _Watchdog_Is_valid_interval_timespec()Sebastian Huber2017-10-241-0/+7
| | | | | Update #3117. Update #3182.
* score: _Watchdog_Is_far_future_realtime_timespec()Sebastian Huber2017-10-241-9/+32
| | | | | Update #3117. Update #3182.
* score: Rename _Watchdog_Ticks_from_*()Sebastian Huber2017-10-241-3/+3
| | | | | | | | | | Rename _Watchdog_Ticks_from_*() to _Watchdog_Realtime_from_*(). This highlights that these routines are used for the CLOCK_REALTIME watchdogs (in contrast to CLOCK_MONOTONIC). Update #3117. Update #3182.
* score: Add _Watchdog_Ticks_per_secondSebastian Huber2017-10-241-0/+8
| | | | | | | | This value is frequently used. Avoid the function call overhead and the integer division at run-time. Update #3117. Update #3182.
* score: Add _Thread_Add_timeout_ticks()Sebastian Huber2017-10-241-6/+5
| | | | | | | | Replace _Thread_Timer_insert_monotonic() with _Thread_Add_timeout_ticks(). Update #3117. Update #3182.
* score: Rename _Watchdog_Per_CPU_insert_monotonic()Sebastian Huber2017-10-172-2/+2
| | | | | | | | Rename _Watchdog_Per_CPU_insert_monotonic() in _Watchdog_Per_CPU_insert_ticks(). Update #3117. Update #3182.
* score: Rename watchdog variantsSebastian Huber2017-10-173-26/+30
| | | | | | | | | | | Rename PER_CPU_WATCHDOG_RELATIVE in PER_CPU_WATCHDOG_MONOTONIC to highlight the corresponding POSIX CLOCK_MONOTONIC. Rename PER_CPU_WATCHDOG_ABSOLUTE in PER_CPU_WATCHDOG_REALTIME to highlight the corresponding POSIX CLOCK_REALTIME. Update #3117. Update #3182.
* score: Remove unused function declarationSebastian Huber2017-10-121-15/+0
|
* timecounter: Update FreeBSD identifiersSebastian Huber2017-10-124-4/+4
| | | | Update #3175.
* timecounter: Merge FreeBSD change r304285Konstantin Belousov2017-10-121-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement userspace gettimeofday(2) with HPET timecounter. Right now, userspace (fast) gettimeofday(2) on x86 only works for RDTSC. For older machines, like Core2, where RDTSC is not C2/C3 invariant, and which fall to HPET hardware, this means that the call has both the penalty of the syscall and of the uncached hw behind the QPI or PCIe connection to the sought bridge. Nothing can me done against the access latency, but the syscall overhead can be removed. System already provides mappable /dev/hpetX devices, which gives straight access to the HPET registers page. Add yet another algorithm to the x86 'vdso' timehands. Libc is updated to handle both RDTSC and HPET. For HPET, the index of the hpet device to mmap is passed from kernel to userspace, index might be changed and libc invalidates its mapping as needed. Remove cpu_fill_vdso_timehands() KPI, instead require that timecounters which can be used from userspace, to provide tc_fill_vdso_timehands{,32}() methods. Merge i386 and amd64 libc/<arch>/sys/__vdso_gettc.c into one source file in the new libc/x86/sys location. __vdso_gettc() internal interface is changed to move timecounter algorithm detection into the MD code. Measurements show that RDTSC even with the syscall overhead is faster than userspace HPET access. But still, userspace HPET is three-four times faster than syscall HPET on several Core2 and SandyBridge machines. Tested by: Howard Su <howard0su@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 1 month Differential revision: https://reviews.freebsd.org/D7473 Update #3175.
* timecounter: Merge FreeBSD change r303382Konstantin Belousov2017-10-121-7/+14
| | | | | | | | | | | | | | | | | | | | | | Hide the boottime and bootimebin globals, provide the getboottime(9) and getboottimebin(9) KPI. Change consumers of boottime to use the KPI. The variables were renamed to avoid shadowing issues with local variables of the same name. Issue is that boottime* should be adjusted from tc_windup(), which requires them to be members of the timehands structure. As a preparation, this commit only introduces the interface. Some uses of boottime were found doubtful, e.g. NLM uses boottime to identify the system boot instance. Arguably the identity should not change on the leap second adjustment, but the commit is about the timekeeping code and the consumers were kept bug-to-bug compatible. Tested by: pho (as part of the bigger patch) Reviewed by: jhb (same) Discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 month X-Differential revision: https://reviews.freebsd.org/D7302 Update #3175.
* timecounter: Merge FreeBSD change r298981Pedro Giffuni2017-10-121-1/+1
| | | | | | | | | | sys/sys: minor spelling fixes. While the changes are minor, these headers are very visible. MFC after: 2 weeks Update #3175.
* timecounter: Merge FreeBSD change r304285Ian Lepore2017-10-121-1/+1
| | | | | | | | | | Constify the pointers to eventtimer and timecounter name strings. The need for this appears as soon as you try to set the names to something that isn't a "quoted literal". (I'm actually confused why quoted strings aren't a problem as well, we must have some warning disabled.) Update #3175.
* timecounter: Merge FreeBSD change r282424Ian Lepore2017-10-121-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@ Update #3175.
* timecounter: Merge FreeBSD change r279728Hans Petter Selasky2017-10-121-0/+5
| | | | | | | | | Add mutex support to the pps_ioctl() API in the kernel. Bump kernel version to reflect structure change. PR: 196897 MFC after: 1 week Update #3175.
* score: Remove CPU_set_ControlSebastian Huber2017-10-115-196/+3
| | | | | | Use Processor_mask instead. Update #2514.
* score: Add _Thread_queue_Dispatch_disable()Sebastian Huber2017-10-103-6/+12
|
* score: Change Timestamp_Control to sbintime_tSebastian Huber2017-10-093-34/+24
| | | | | | | | The timestamp are based on the uptime. There is no need for a 64-bit seconds part. The signed 32-bit seconds part of the sbintime_t limits the uptime to roughly 68 years. Close #2740.
* score: Use struct timespec for TODSebastian Huber2017-10-091-46/+8
| | | | | | | Use the timestamps only for uptime based values. Use struct timespec for the absolute time values (TOD). Update #2740.
* score: Simplify _Timestamp_Add_to()Sebastian Huber2017-10-091-7/+1
| | | | Update #2740.
* posix: Implement self-contained POSIX mutexSebastian Huber2017-10-053-2/+37
| | | | | | | | POSIX mutexes are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3112.
* posix: Implement self-contained POSIX condvarSebastian Huber2017-10-052-2/+0
| | | | | | | | POSIX condition variables are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3113.
* posix: Implement self-contained POSIX rwlocksSebastian Huber2017-10-054-91/+56
| | | | | | | | POSIX rwlocks are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3115.
* posix: Implement self-contained POSIX barriersSebastian Huber2017-10-052-2/+0
| | | | | | | | POSIX barriers are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3114.
* posix: Implement self-contained POSIX semaphoresSebastian Huber2017-10-051-0/+73
| | | | | | | | | | | | | | For semaphore object pointer and object validation see POSIX_SEMAPHORE_VALIDATE_OBJECT(). Destruction or close of a busy semaphore returns an error status. The object is not flushed. POSIX semaphores are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3116.
* posix: Optimize pthread_once_tSebastian Huber2017-10-051-1/+1
| | | | | | Reduce size of pthread_once_t and make it zero-initialized. Update #3142.
* score: Make status codes unconditionalSebastian Huber2017-10-051-9/+2
| | | | | | | | The internal status codes encode a Classic rtems_status_code and error codes used by the POSIX and C11/C++11 APIs. In case the POSIX API is disabled, the C11/C++11 support must still work. Close #3167.
* score: Simplify red-black tree debug supportSebastian Huber2017-09-271-8/+0
| | | | | | | | Make the RBTree_Node layout independent of RTEMS_DEBUG (and all other build configuration options). This allows the use of this structure in Newlib. Update #3112.
* score: Rename to _Scheduler_ControlSebastian Huber2017-09-277-15/+15
| | | | | | | Rename struct Scheduler_Control to _Scheduler_Control to allow its use in standard header files, e.g. <pthread.h>. Update #3112.
* score: Include missing header fileSebastian Huber2017-09-221-0/+2
| | | | Update #3059.
* score: Remove <string.h> include from basedefs.hSebastian Huber2017-08-251-7/+0
| | | | Close #2133.
* score: Remove <limits.h> include from basedefs.hSebastian Huber2017-08-251-7/+0
| | | | Close #2132.
* heap: Fix integer typesSebastian Huber2017-08-221-3/+3
| | | | Update #3082.
* score: Add RTEMS_HAVE_MEMBER_SAME_TYPE()Sebastian Huber2017-07-312-2/+25
| | | | This fixes some "variably modified" warnings and a clang compile error.
* INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNITSebastian Huber2017-07-251-1/+2
| | | | | | Add new fatal error INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT. Update #3077.
* score: Add optional _CPU_Context_Destroy()Sebastian Huber2017-07-251-0/+7
| | | | Update #3077.
* score: Fix typoSebastian Huber2017-07-121-1/+1
| | | | Update #3059.
* Add interrupt vector set/get affinitySebastian Huber2017-07-121-0/+25
| | | | Close #3071.
* score: Fix set schedulerSebastian Huber2017-07-101-5/+13
| | | | | | | Ensure that the thread processor affinity fits the new scheduler instance. Update #3059.