summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpukit: Enable debug for SMP AArch64Kinsey Moore2021-11-221-9/+22
| | | | | | | Ensure when both RTEMS_DEBUG is specified and pointers are large that enough space is allocated to accomodate the Per_CPU_Control structure. This changes the calculation to be more compositional instead of trying to list out every permutation of options possible.
* score: Fix _CORE_ceiling_mutex_Set_priority()Sebastian Huber2021-11-151-6/+8
| | | | | | | We have to use a second thread queue context to acquire and release the thread wait lock. Close #4356.
* score: Always check if a prio ceiling is definedSebastian Huber2021-11-151-10/+10
| | | | | | | | | | Priority ceiling semaphores (in contrast to MrsP semaphores) have only one priority ceiling which is defined for the home scheduler of the task which created the semaphore. Always check during a semaphore seize that the home scheduler of the calling task is equal to this scheduler. This avoids a scheduler mismatch if the semphore is acquired after the calling thread blocked on the semaphore.
* score: Fix thread pinning assertionsSebastian Huber2021-11-151-2/+2
|
* score: Add _Timecounter_Set_NTP_update_second()Sebastian Huber2021-11-151-1/+23
| | | | | | | Allow the installation of an NTP update second handler which may be used by an NTP service. Update #2348.
* score: Introduce CPU budget operationsSebastian Huber2021-11-1514-129/+155
| | | | | | | | | | | | | | This patch set replaces the CPU budget algorithm enumeration with a set of CPU budget operations which implement a particular CPU budget algorithm. This helps to hide the CPU budget algorithm implementation details from the general thread handling. The CPU budget callouts are turned into CPU budget operations. This slightly reduces the size of the thread control block. All schedulers used the default scheduler tick implementation. The tick scheduler operation is removed and the CPU budget operations are directly used in _Watchdog_Tick() if the executing thread uses a CPU budget algorithm. This is performance improvement for all threads which do not use a CPU budget algorithm (default behaviour).
* cpukit: Add signal mapping supportKinsey Moore2021-10-291-0/+71
| | | | | | This adds a confdef option allowing an application to request mapping machine exceptions to POSIX signals. This is required for some languages such as Ada.
* score: Fix typoSebastian Huber2021-10-251-2/+2
|
* rtems: Fix rate monotonic statisticsSebastian Huber2021-10-253-12/+47
| | | | | | | | | | | | | | | The rate monotonic period statistics were affected by rtems_cpu_usage_reset(). The logic to detect and work around a CPU usage reset was broken. The Thread_Contol::cpu_time_used is changed to contain the processor time used throughout the entire lifetime of the thread. The new member Thread_Contol::cpu_time_used_at_last_reset is added to contain the processor time used at the time of the last reset through rtems_cpu_usage_reset(). This decouples the resets of the CPU usage and the rate monotonic period statistics. Update #4528.
* score: Simplify _Watchdog_Next_first()Sebastian Huber2021-10-251-19/+36
|
* Add support for IDLE Thread stack allocatorJoel Sherrill2021-10-111-0/+24
| | | | | | | | Add a stack allocator hook specifically for allocation of IDLE thread stacks. This allows the user to decide if IDLE thread stacks are statically allocated or handled by the same custom allocator mechanism as other thread stacks. Closes #4524.
* score: Always check queue in _Thread_Wait_cancel()Sebastian Huber2021-10-061-2/+2
| | | | | | Commit 18c8a270c296addff87f96b8c248f27eba31c24f removed _Thread_queue_Do_nothing_extract() so we have to check for a non-NULL queue in all configurations.
* score: Optimize EDF SMP scheduler opsSebastian Huber2021-10-061-1/+1
| | | | | | | The schedule operation is only called by rtems_task_mode(). It is called if preempt mode of the executing thread changes from disabled to enabled. Since the EDF SMP scheduler does not support the disabled preemption mode, the schedule operation is never called.
* scoe: Move workspace group definitionSebastian Huber2021-10-062-10/+10
| | | | | | Define the group in the header file which is used by <rtems/confdefs.h>. Update #3706.
* score: Add Hash Handler to groupSebastian Huber2021-10-061-0/+2
| | | | Update #3706.
* score: Add Thread_queue_Deadlock_statusSebastian Huber2021-10-011-11/+39
| | | | | | Replace the boolen return value with the new enum Thread_queue_Deadlock_status. This improves the code readability. Improve documentation. Shorten function names.
* score: Regenerate <rtems/score/basedefs.h>Sebastian Huber2021-09-301-1/+1
| | | | Reflect renamed specification item.
* score: Remove unused default scheduler opsSebastian Huber2021-09-211-46/+13
| | | | | | | | | | If SMP support is enabled and the system has exactly one processor, then it may use an uniprocessor scheduler. The ask for help, reconsider help request, and withdraw node operations can be NULL in this case, since they are only used if a thread has at least one helping scheduler node. At least two schedulers are required to get a helping node and each scheduler involved must own at least one processor. This is not possible on a system with exactly one processor.
* score: Ensure only one CPU if requiredSebastian Huber2021-09-211-1/+2
| | | | | | | Issue the new fatal SMP error SMP_FATAL_SCHEDULER_REQUIRES_EXACTLY_ONE_PROCESSOR if the system starts with not exactly one processor and an uniprocessor scheduler is configured.
* score: Provide two thread pin/unpin defaultsSebastian Huber2021-09-215-11/+32
| | | | | | | | | | | | | | The uniprocessor schedulers do not support systems with more than more processors. So they rivially support thread pinning and thus the SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED cannot happen. Add a second default implementation for SMP schedulers which do not support thread pinning. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
* score: SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITYSebastian Huber2021-09-217-8/+20
| | | | | Rename SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY in SCHEDULER_DEFAULT_SET_AFFINITY_OPERATION. Add Doxygen comment.
* score: SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELPSebastian Huber2021-09-215-6/+17
| | | | | Rename SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP in SCHEDULER_DEFAULT_SMP_OPERATIONS. Add a Doxygen comment.
* 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
|
* score: Document thread queue operationsSebastian Huber2021-09-032-9/+61
|
* score: Update priority only if necessarySebastian Huber2021-09-011-2/+2
| | | | | | In _Thread_queue_Flush_critical(), update the priority of the thread queue owner only if necessary. The scheduler update priority operation could be expensive.
* score: Remove _Thread_queue_Unblock_critical()Sebastian Huber2021-09-011-28/+6
| | | | | This function was only used in one place. Replace it with a call to _Thread_queue_Resume().
* score: Remove _Thread_queue_First_locked()Sebastian Huber2021-09-011-28/+0
| | | | | The _Thread_queue_First_locked() was only used in one place. Move the code of this inline function to this place.
* score: Fix blocking message queue receiveSebastian Huber2021-09-012-54/+25
| | | | | | | | | | | | | In order to ensure FIFO fairness across schedulers, the thread queue surrender operation must be used to dequeue a thread from the thread queue. The thread queue extract operation is intended for timeouts. Add _Thread_queue_Resume() which may be used to make extracted or surrendered threads ready again. Remove the now unused _Thread_queue_Extract_critical() function. Close #4509.
* score: Fix priority discipline handlingSebastian Huber2021-09-013-58/+56
| | | | | | | | | | | The priority queues in clustered scheduling configurations use a per scheduler priority queue rotation to ensure FIFO fairness across schedulers. This mechanism is implemented in the thread queue surrender operation. Unfortunately some semaphore and message queue directives used wrongly the thread queue extract operation. Fix this through the use of _Thread_queue_Surrender(). Update #4358.
* score: Delete unused rtems_ada_selfSebastian Huber2021-08-181-5/+0
|
* score: Make zombie registry observableSebastian Huber2021-08-181-0/+27
| | | | | | This helps to write tests for _Thread_Wait_for_execution_stop(). Rename Thread_Zombie_control in Thread_Zombie_registry.
* score: Simplify _Scheduler_Tick()Sebastian Huber2021-08-121-4/+22
| | | | | | | | | | | | | | | | | | The NULL pointer check for the executing thread was introduced by commit: commit be3c257286ad870d8d1a64941cde53fd2d33a633 Author: Sebastian Huber <sebastian.huber@embedded-brains.de> Date: Thu Jun 5 11:17:26 2014 +0200 score: Avoid NULL pointer access Check that the executing thread is not NULL in _Scheduler_Tick(). It may be NULL in case the processor has an optional scheduler assigned and the system was not able to start the processor. However, it is no longer necessary since now the clock interrupt is distributed to the online processors.
* score: Replace the single use of a sequence lockSebastian Huber2021-08-122-28/+63
| | | | | | | | | In SMP configurations, on 64-bit architectures use plain atomic operations to set/get the priority value of a scheduler node. On 32-bit architectures use an ISR lock. Using a sequence lock has no real benefit since it uses atomic read-modify-write operations for both the read and the write lock. Simply use a ticket lock instead so that only one SMP synchronization primitive is used for everything.
* score: Replace priority prepend it with an enumSebastian Huber2021-08-125-40/+68
| | | | | | | | Use the new Priority_Group_order enum instead of a boolean to indicated if a priority should be inserted as the first or last node into its priority group. This makes the code more expressive. It is also a bit more efficient since a branch in _Scheduler_Node_set_priority() is avoided and a simple bitwise or operation can be used.
* score: Change _SMP_Send_message() parameter typeSebastian Huber2021-07-291-4/+5
| | | | | Use the processor control to specify the target processor since this is what the callers have available.
* score: Add _Per_CPU_Submit_job()Sebastian Huber2021-07-291-4/+16
|
* score: Remove SMP message multicast/broadcastSebastian Huber2021-07-281-22/+0
| | | | | Remove the unused _SMP_Send_message_multicast() and _SMP_Send_message_broadcast().
* score: Simplify SMP processor state handlingSebastian Huber2021-07-282-37/+66
| | | | | | | | The per-CPU states which control the SMP system initialization were added quite early during the SMP support development. Replace this initial implementation with a simplified one. There is no longer a global SMP lock required which serialized the state changes of all processors. The new implementation better integrates with the per-CPU jobs.
* score: Remove processor event broadcast/receiveSebastian Huber2021-07-281-1/+34
| | | | | | Remove _CPU_SMP_Processor_event_broadcast() and _CPU_SMP_Processor_event_receive(). These functions are hard to use since they are subject to the lost wake up problem.
* score: Remove _Internal_errors_What_happenedSebastian Huber2021-07-281-17/+1
| | | | | | | | | | Users have access to the fatal error source and code though the fatal error extension. The user-specific fatal error handling should be done in statically initialized fatal error handlers. The _Internal_errors_What_happened was updated after the fatal error extension. In addition, there was no API to get the information stored in _Internal_errors_What_happened. In SMP configurations, this object could contain a mix of different fatal errors. Remove this object to save some bytes of storage.
* rtems: Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPTSebastian Huber2021-07-261-0/+7
| | | | | | | | Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPT as the fatal source for spurious interrupts. Use the interrupt vector number of the spurious interrupt for the fatal code. Update #3269.
* cpukit: occured -> occurredSebastian Huber2021-07-168-15/+15
|
* Update Strong APA SchedulerRichi Dubey2021-06-241-33/+129
| | | | | | | | | | This change allows for the migration of higher priority tasks on the arrival of a lower priority task limited by affinity constraints. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
* score: Add PER_CPU_DATA_NEED_INITIALIZATION()Sebastian Huber2021-06-101-0/+14
| | | | | | | | | Make the initialization of the per-CPU data optional. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
* score: Fix initialization of thread queue contextSebastian Huber2021-06-101-3/+9
| | | | | | | Set Thread_queue_Context::timeout_absolute in _Thread_queue_Context_set_timeout_argument() to avoid using it uninitialized. The bug was introduced by a89ecaa1a94d49ddae7753d6b83923e9d2a00486.
* score: Remove unused _Per_CPU_Initialize() declSebastian Huber2021-06-081-7/+0
|