summaryrefslogtreecommitdiffstats
path: root/cpukit/score (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Split up rbtreenext.cSebastian Huber2021-09-064-28/+177
| | | | | | | | | | Split up rbtreenext.c since only _RBTree_Minimum() is used by the operating system core services (thread queues and the EDF scheduler). Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
* score: Limit the CLOCK_REALTIME settingSebastian Huber2021-09-061-1/+1
| | | | | 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-063-21/+67
| | | | | | 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-30/+0
| | | | Use _Watchdog_Ticks_per_second instead.
* score: Return status in _TOD_Adjust()Sebastian Huber2021-09-061-2/+5
|
* score: Move _Thread_Dispatch()Sebastian Huber2021-09-032-20/+61
| | | | | | | | | | | | The _Thread_Dispatch() function was customized over time and now the work is done by _Thread_Do_dispatch() and specialized wrappers. The plain _Thread_Dispatch() is now only used in some CPU ports. Move it to a separate file to avoid dead code in the general. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
* score: Document thread queue operationsSebastian Huber2021-09-031-2/+2
|
* score: Update priority only if necessarySebastian Huber2021-09-012-10/+14
| | | | | | 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-32/+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-1/+9
| | | | | 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-28/+37
| | | | | | | | | | | | | 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-012-20/+117
| | | | | | | | | | | 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: Document Futex HandlerSebastian Huber2021-09-011-2/+40
| | | | | | | | | | | | | | The behaviour of the futex operations is defined by Linux: https://man7.org/linux/man-pages/man2/futex.2.html Use EAGIN instead of EWOULDBLOCK to be in line with the Linux man page. These error numbers have the same value in Newlib. Using the same error numbers helps to avoid confusion. When you look at the history of the Linux man page you see that they replaced EWOULDBLOCK with EAGAIN over time. At the time of the RTEMS futex implementation they used EWOULDBLOCK.
* score: Make zombie registry observableSebastian Huber2021-08-181-16/+13
| | | | | | This helps to write tests for _Thread_Wait_for_execution_stop(). Rename Thread_Zombie_control in Thread_Zombie_registry.
* score: Simplify _Thread_Kill_zombies()Sebastian Huber2021-08-181-8/+11
|
* score: Simplify _Per_CPU_Wait_for_job()Sebastian Huber2021-08-181-1/+0
| | | | | The _SMP_Fatal() is a no-return function, so the "break" statement is superfluous.
* score: Simplify _Thread_Create_idle_for_CPU()Sebastian Huber2021-08-181-7/+1
| | | | Online processors have a scheduler assigned.
* score: Replace the single use of a sequence lockSebastian Huber2021-08-121-2/+2
| | | | | | | | | 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-124-27/+36
| | | | | | | | 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.
* Turn off executable permissions for a number of source filesJoel Sherrill2021-08-091-0/+0
| | | | | | | Cloning under Cygwin turned off executable permission on these files. This shows them as modified even though they have not explicitly been touched. Executable permission should not have been on for these files so this is just a minor clean up.
* score: Disable interrupts in SMP shutdownSebastian Huber2021-08-031-0/+5
|
* score: Change _SMP_Send_message() parameter typeSebastian Huber2021-07-292-5/+3
| | | | | Use the processor control to specify the target processor since this is what the callers have available.
* score: Assert job properties in _Per_CPU_Add_job()Sebastian Huber2021-07-291-0/+2
|
* score: Add _Per_CPU_Submit_job()Sebastian Huber2021-07-293-5/+10
|
* score: Split SMP multicast action moduleSebastian Huber2021-07-294-32/+154
| | | | | Split up the SMP multicast action module since the use of the SMP multicast action variants depend on the architecture and BSP.
* score: Return value in _SMP_Process_message()Sebastian Huber2021-07-281-0/+2
|
* score: Canonicalize _CPU_Fatal_halt()Sebastian Huber2021-07-2851-287/+225
| | | | | | | | Move _CPU_Fatal_halt() declaration to <rtems/score/cpuimpl.h> and make sure it is a proper declaration of a function which does not return. Fix the type of the error code. If necessary, add the implementation to cpu.c. Implementing _CPU_Fatal_halt() as a function makes it possible to wrap this function for example to fully test _Terminate().
* score: Move per-CPU jobs supportSebastian Huber2021-07-282-86/+127
| | | | Add percpujobs.c to contain the per-CPU jobs implementation.
* score: Remove SMP message multicast/broadcastSebastian Huber2021-07-281-39/+1
| | | | | Remove the unused _SMP_Send_message_multicast() and _SMP_Send_message_broadcast().
* score: Simplify SMP processor state handlingSebastian Huber2021-07-284-190/+143
| | | | | | | | 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-2811-124/+17
| | | | | | 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-10/+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.
* cpukit: occured -> occurredSebastian Huber2021-07-163-5/+5
|
* sparc: Prefer RTEMS_FATAL_SOURCE_EXCEPTIONSebastian Huber2021-07-151-14/+0
| | | | | | Prefer RTEMS_FATAL_SOURCE_EXCEPTION over INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT since the fatal code (rtems_exception_frame) provides more context.
* Fix compiler warnings for schedulerstrongapa.cRichi Dubey2021-07-061-4/+20
|
* arm: For AArch32 use non-shareable memorySebastian Huber2021-06-291-2/+2
| | | | | | | | The Cortex-R52 does not support cache coherency and the shareable memory attribute. If a region is configured to be shareable, then it falls back to use non-cacheable memory. Update #4202.
* arm: Fix AARCH32_PMSA_ATTR_XN valueSebastian Huber2021-06-291-1/+1
| | | | Update #4202.
* arm: Fix AArch32 memory attribute definesSebastian Huber2021-06-291-4/+4
| | | | Update #4202.
* arm: Disable alignment check in PMSA initSebastian Huber2021-06-291-1/+1
| | | | | | | Disable the alignment check through SCTLR[A] in _AArch32_PMSA_Initialize(). Update #4202.
* Update Strong APA SchedulerRichi Dubey2021-06-241-192/+789
| | | | | | | | | | 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.
* sparc: Simplify trap table initializationSebastian Huber2021-06-243-54/+638
| | | | | | | | | | | | | | | Move _ISR_Handler() to a separate file since it is now only used if a handler is installed by _CPU_ISR_install_raw_handler(). Statically initialize the traps for external interrupts to use the new _SPARC_Interrupt_trap() which directly dispatches the interrupt handlers installed by rtems_interrupt_handler_install() via the BSP-provided _SPARC_Interrupt_dispatch(). Since the trap table is now fully statically initialized, there is no longer a dependency on the Cache Manager in the default configuration. Update #4458.
* sparc: Move FP frame offset defines to cpuimpl.hSebastian Huber2021-06-242-57/+57
| | | | | | This makes them usable in multiple files. Update #4458.
* sparc: More reliable bad trap handlingSebastian Huber2021-06-245-1/+513
| | | | | | | | | | | | | Statically initialize the trap table in start.S to jump to _SPARC_Bad_trap() for all unexpected traps. This enables a proper RTEMS fatal error handling right from the start. Do not rely on the stack and register settings which caused an unexpected trap. Use the ISR stack of the processor to do the fatal error handling. Save the full context which caused the trap. Fatal error handler may use it for error logging. Unify the _CPU_Exception_frame_print() implementations and move it to cpukit. Update #4459.
* sparc: Move ISR handler install routinesSebastian Huber2021-06-242-174/+201
| | | | | | | | Move _CPU_ISR_install_raw_handler() and _CPU_ISR_install_vector() to separate files. The goal is to make their use optional. Update #4458. Update #4459.
* score: Move _ISR_Vector_table[] to separate fileSebastian Huber2021-06-242-8/+48
| | | | | | | | | | The _ISR_Handler_initialization() does not touch the _ISR_Vector_table[]. Move the definition of _ISR_Vector_table[] to a separate file. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
* score: Remove bogus _ISR_Nest_level settingSebastian Huber2021-06-241-4/+0
| | | | | | | This variable is actually contained in _Per_CPU_Information[] which is already zero initialized. Remove superfluous includes.
* score: Remove _CPU_Initialize_vectors()Sebastian Huber2021-06-2413-76/+0
| | | | | | | This CPU port macro was not used. Since the _ISR_Vector_table[] is statically allocated, CPU ports could initialize this table in _CPU_Initialize() if necessary. Remove _CPU_Initialize_vectors() to simplify the CPU port interface.
* cpu/armv7m: Fix initialization of MPU regionsChristian Mauderer2021-06-211-1/+1
| | | | | | | | | | | The write to RBAR didn't have the valid flag set. Therefore the write to RASR had an influence on the previously set region. That means for example that if Region 0 had been enabled but 1 should be disabled due to a size of 0, the previous code would have disabled region 0 instead. This patch fixes that behaviour. Close #4450
* cpu/armv7m: Avoid regions with negative sizeChristian Mauderer2021-06-211-1/+1
| | | | | | | Don't initialze regions that have a negative size (for example due to a wrong calculation). Update #4450
* arm: Fix parameter use in AARCH32_PMSA_MEM_ATTR()Sebastian Huber2021-06-161-1/+1
| | | | Update #4202.