summaryrefslogtreecommitdiffstats
path: root/cpukit (follow)
Commit message (Collapse)AuthorAgeFilesLines
* libtest: Return fixture context in T_case_begin()Sebastian Huber2021-09-022-2/+3
| | | | This makes it similar to T_push_fixture().
* score: Update priority only if necessarySebastian Huber2021-09-013-12/+16
| | | | | | 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-012-60/+12
| | | | | 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-012-29/+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-014-82/+62
| | | | | | | | | | | | | 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-018-148/+196
| | | | | | | | | | | 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.
* rtems: Fix partitions with RTEMS_MULIPROCESSINGSebastian Huber2021-08-311-1/+1
| | | | Replace call to removed _Partition_Free() with a call to _Objects_Free().
* libmisc/shell: Check the shell command pointers when adding a commandChris Johns2021-08-211-0/+5
|
* libmisc/fdt: fix node initialise error with RTEMS_DEBUGChris Johns2021-08-211-0/+2
|
* cpukit/mghttpd: Support all descriptors in selectChris Johns2021-08-191-0/+31
| | | | | | | | - Support all possible descriptors in a select call. Borrowed from Christain and his mDNS change in LibBSD - If select (or poll) fails pause for a bit rather than locking up in a hard loop
* confstr() support for RTEMSEshan dhawan2021-08-182-0/+128
| | | | | | | | Closes #3373 confstr() style update Signed-off-by: Eshan Dhawan <eshandhawan51@gmail.com>
* score: Delete unused rtems_ada_selfSebastian Huber2021-08-181-5/+0
|
* score: Make zombie registry observableSebastian Huber2021-08-182-16/+40
| | | | | | 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: 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-123-30/+65
| | | | | | | | | 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-1213-71/+108
| | | | | | | | 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.
* rtems: Fix rtems_partition_return_buffer()Sebastian Huber2021-08-125-17/+30
| | | | | | | | The rtems_partition_return_buffer() wrongly accepted which were exactly at the buffer area end. Use the buffer area limit address for the range checking. Close #4490.
* Test needed for timer_create with CLOCK_MONOTONCZacchaeus Leung2021-08-113-19/+33
| | | | | | | | the timer_create() method can use CLOCK_MONOTONIC but there was no test for this. Also it implements the functionality to create a CLOCK_MONOTONIC timer and gettime() . Closes #3888
* 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
|
* rtems: Generate <rtems/bspIo.h>Sebastian Huber2021-08-028-91/+324
| | | | | | | | | | | | Change license to BSD-2-Clause according to file histories and documentation re-licensing agreement. Place the group into the I/O Manager group. Add all source files to the group. Update #3899. Update #3993. Update #4482.
* score: Change _SMP_Send_message() parameter typeSebastian Huber2021-07-293-9/+8
| | | | | 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-295-12/+27
|
* score: Split SMP multicast action moduleSebastian Huber2021-07-295-32/+157
| | | | | 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-283-86/+128
| | | | Add percpujobs.c to contain the per-CPU jobs implementation.
* score: Remove SMP message multicast/broadcastSebastian Huber2021-07-282-61/+1
| | | | | Remove the unused _SMP_Send_message_multicast() and _SMP_Send_message_broadcast().
* score: Simplify SMP processor state handlingSebastian Huber2021-07-286-227/+209
| | | | | | | | 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-2812-125/+51
| | | | | | 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.
* libcsupport: Consistent rtems_putc() outputSebastian Huber2021-07-281-16/+34
| | | | | | | | | Use the same function to output the '\r\n' combination produced by rtems_putc(). Fix the format. Change licence according to file history. Update #3053.
* libcsupport: Fix TOCTOU in getchark()Sebastian Huber2021-07-281-8/+13
| | | | | | | Use the same function pointer value to check against NULL and call the function (if non-NULL). Fix format, add Doxygen comments, and reduce includes.
* score: Remove _Internal_errors_What_happenedSebastian Huber2021-07-282-27/+2
| | | | | | | | | | 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_interrupt_entry_install()Sebastian Huber2021-07-261-0/+237
| | | | | | | | | | Add RTEMS_INTERRUPT_ENTRY_INITIALIZER(), rtems_interrupt_entry_initialize(), and rtems_interrupt_entry_remove(). This allows to install interrupt handlers using user-provided storage as an alternative to rtems_interrupt_handler_install() which has to allocate memory. Update #3269.
* rtems: Add RTEMS_FATAL_SOURCE_SPURIOUS_INTERRUPTSebastian Huber2021-07-262-1/+9
| | | | | | | | 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.
* rtems: Add rtems_interrupt_is_pending()Sebastian Huber2021-07-261-0/+54
| | | | Update #3269.
* rtems: Add rtems_interrupt_vector_is_enabled()Sebastian Huber2021-07-261-0/+50
| | | | Update #3269.
* rtems: Add rtems_interrupt_vector_enable()Sebastian Huber2021-07-261-0/+88
| | | | | | Add rtems_interrupt_vector_disable(). Update #3269.
* rtems: Add rtems_interrupt_get_attributes()Sebastian Huber2021-07-261-0/+207
| | | | | | | Add a directive to query the attributes of an interrupt vector. This can be used for generic tests and system diagnostics. Update #3269.
* rtems: Generate <rtems/irq-extension.h>Sebastian Huber2021-07-261-476/+1354
| | | | | | | | | | | | | Use <rtems/score/chain.h> which just provides the data types and avoid a dependency on <rtems/chain.h> which contains the full chain implementation. Change license to BSD-2-Clause according to file histories and documentation re-licensing agreement. Update #3269. Update #3899. Update #3993.
* rtems: Add rtems_interrupt_raise()Sebastian Huber2021-07-261-37/+125
| | | | | | | | Add rtems_interrupt_raise_on(). Document the currently not implemented rtems_interrupt_clear(). Remove the not implemented and badly named rtems_interrupt_cause() directive. Update #3269.
* cpukit: occured -> occurredSebastian Huber2021-07-1623-64/+64
|
* 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.
* rtems: Fix Doxygen commentSebastian Huber2021-07-151-2/+2
|
* Fix compiler warnings for schedulerstrongapa.cRichi Dubey2021-07-061-4/+20
|