summaryrefslogtreecommitdiffstats
path: root/cpukit (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update Strong APA SchedulerRichi Dubey2021-06-243-229/+924
| | | | | | | | | | 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-244-54/+639
| | | | | | | | | | | | | | | 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-246-1/+515
| | | | | | | | | | | | | 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-243-174/+202
| | | | | | | | 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-243-8/+49
| | | | | | | | | | 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.
* i2c: Add non blocking read / writeChristian Mauderer2021-06-222-6/+83
| | | | | | | This adds the possibility to open an I2C bus with O_NONBLOCK (or set it later via fcntl) to get non-blocking transmissions. This means that if the bus is busy, a read, write or transfer ioctl will return with a EAGAIN errno.
* cpukit: Add timespecisnonnegative to Makefile.amRyan Long2021-06-211-0/+1
|
* 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
* rtems: Fix rtems_task_set_affinity() docsSebastian Huber2021-06-171-1/+1
|
* arm: Fix parameter use in AARCH32_PMSA_MEM_ATTR()Sebastian Huber2021-06-161-1/+1
| | | | Update #4202.
* score: Comment _Thread_queue_Surrender_sticky()Sebastian Huber2021-06-151-1/+7
| | | | | The change also helps to avoid reports from static analysers since most callers of _Thread_queue_Make_ready_again() check the unblock status.
* Use a common phrase for pointer parametersSebastian Huber2021-06-1514-181/+180
| | | | | | | Mention the type of the pointer in the parameter description. Use the more general term "object" instead of "variable". Update #3993.
* score: Add PER_CPU_DATA_NEED_INITIALIZATION()Sebastian Huber2021-06-105-55/+113
| | | | | | | | | 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-106-9/+15
| | | | | | | Set Thread_queue_Context::timeout_absolute in _Thread_queue_Context_set_timeout_argument() to avoid using it uninitialized. The bug was introduced by a89ecaa1a94d49ddae7753d6b83923e9d2a00486.
* sysconf: Remove sysconf(515)Ryan Long2021-06-091-4/+0
| | | | | | | GCC originally needed this 20 years ago. No longer needed, so it is being removed. Closes #4391
* main_edit.c: get rid of malloc warningRyan Long2021-06-091-8/+8
| | | | | | A warning was present when building RTEMS that stated that the argument for malloc() exceeded the maximum object size. To get rid of this, I changed many places where 'int' was being used to 'size_t'.
* futimens.c, utime.c: Remove unnecessary include of <sys/stat.h>.Joel Sherrill2021-06-092-2/+0
|
* score: Remove unused _Per_CPU_Initialize() declSebastian Huber2021-06-081-7/+0
|
* cpukit/libdebugger: Fix for sockaddr_in not being initializedHarrison Edward Gerber2021-06-021-1/+1
| | | | | | See also CID 1468684 Closes #4445
* cpukit/libmisc/monitor: Fix src/dest overlap of strcpy in mon-editor.cHarrison Edward Gerber2021-05-281-1/+11
| | | | | | See also CID 1399727 Closes #4444
* Change filesystem utime_h handler to utimens_hRyan Long2021-05-2818-177/+292
| | | | | | | Also updated licenses. Closes #4400 Updates #3899
* libcsupport: Implement utimes() in terms of utimensat()Ryan Long2021-05-281-14/+49
| | | | | | | | | utimes() now calls utimensat() to update file access and modification timestamps. Updated license. Closes #4398
* libcsupport: Implement utime() in terms of utimensat()Ryan Long2021-05-281-32/+40
| | | | | | | | | utime() now calls utimensat() to update file access and modification timestamps. Updated license. Closes #4397
* libcsupport: Added futimens() and utimensat()Ryan Long2021-05-286-15/+491
| | | | | | | | | | Created futimens.c and utimensat.c to add support for the POSIX methods futimens() and utimensat(). utime() and utimes() are considered obsolote by POSIX, but RTEMS will continue to support them. Closes #4396
* main_help.c: Do not care what char is returned by getchar()Ryan Long2021-05-281-1/+1
| | | | | | CID 1437650: Unchecked return value from library in rtems_shell_help(). Closes #4291
* main_cp.c: Ignore return value from stat()Ryan Long2021-05-281-0/+6
| | | | | | CID 26051: Unchecked return value from library in main_cp(). Closes #4365
* gen_uuid.c: Ignore return values from fcntl()Ryan Long2021-05-281-0/+6
| | | | | | | CID 1049146: Unchecked return value from library in get_clock(). CID 1049147: Unchecked return value from library in get_random_fd(). Closes #4280
* thread-API: Add rtems_*mutex_try_lockChristian Mauderer2021-05-281-0/+12
| | | | | | This adds a rtems_mutex_try_lock and a rtems_recursive_mutex_try_lock. Update #4440.
* cpukit: Add description of release version numbersChristian Mauderer2021-05-281-0/+21
| | | | | The release version in the git sources doesn't change. Add a note why that is the case.
* score: Add RTEMS_UNREACHABLE() to a groupSebastian Huber2021-05-281-0/+2
|
* bsps/aarch64: Add MMU driver to relax alignmentKinsey Moore2021-05-271-16/+50
| | | | | | | | | | | | | | | Currently, the AArch64 BSPs have a hard time running on real hardware without building the toolchain and the bsps with -mstrict-align in multiple places. Configuring the MMU on these chips allows for unaligned memory accesses for non-device memory which avoids requiring strict alignment in the toolchain and in the BSPs themselves. In writing this driver, it was found that the synchronous exception handling code needed to be rewritten since it relied on clearing SCTLR_EL1 to avoid thread stack misalignments in RTEMS_DEBUG mode. This is now avoided by exactly preserving thread mode stack and flags and the new implementation is compatible with the draft information provided on the mailing list covering the Exception Management API.
* bsps/aarch64: Break out system registersKinsey Moore2021-05-271-0/+9985
| | | | | Break out system register definitions and accessors so that they're usable by other parts of RTEMS.
* rtems: Document new rtems_task_delete() errorSebastian Huber2021-05-271-0/+3
| | | | Update #4414.
* cpukit/libpci: fix potential buffer overflow in pci_cfg_print_code.cHarrison Edward Gerber2021-05-261-2/+2
| | | | | | See also CID 1399721 Closes #4442
* score/aarch64: Align context validation frameKinsey Moore2021-05-261-11/+18
| | | | | | Ensure the stack remains aligned by keeping the context frame at a multiple of 16 bytes. This avoids stack alignment exceptions which occur when the stack pointer is not 16 byte aligned.
* score: Direct thread dispatch in a self restartSebastian Huber2021-05-261-5/+11
| | | | | | | | | | Commit 73ebf9a27ed5cd0fd3e0dc0da98345d7faa610a2 accidentally removed the direct thread dispatch in a self thread restart. In case of a self restart (always in task context) the directive shall not return. If this is not possible due to a bad thread dispatch disable level, then a fatal error shall occur. Update #4412.
* score: Fix _Thread_Cancel()Sebastian Huber2021-05-261-26/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _Thread_Cancel() (in contrast to _Thread_Restart() which used a similar code block) may have produced ready threads with an active timer in case the thread to cancel had its thread life protection enabled. The problem was this code block: Priority_Control priority; _Thread_Add_life_change_request( the_thread ); if ( _Thread_Is_life_change_allowed( previous ) ) { _Thread_State_release( the_thread, &lock_context ); _Thread_queue_Extract_with_proxy( the_thread ); _Thread_Timer_remove( the_thread ); } else { _Thread_Clear_state_locked( the_thread, STATES_SUSPENDED ); _Thread_State_release( the_thread, &lock_context ); } priority = _Thread_Get_priority( executing ); _Thread_Raise_real_priority( the_thread, priority ); _Thread_Remove_life_change_request( the_thread ); The life change request should only be added/removed if a life change is allowed (see _Thread_Restart()). Add _Thread_Try_life_change_request() and use it in _Thread_Cancel() and _Thread_Restart(). Close #4435.
* posix: Allow pthread_cancel() from within ISRsSebastian Huber2021-05-261-9/+4
| | | | Close #4413.
* score: Simplify calling _Thread_Exit()Sebastian Huber2021-05-266-53/+28
| | | | | Move common code into _Thread_Exit(). This enables a tail call optimization in most cases.
* rtems: Return RTEMS_CALLED_FROM_ISRSebastian Huber2021-05-261-5/+15
| | | | | | | If rtems_task_delete() is called from within interrupt context, then return RTEMS_CALLED_FROM_ISR. This makes the behaviour predictable. Update #4414.
* sysinit: Do not open console when just referencing reentrancy structure.Joel Sherrill2021-05-252-6/+21
| | | | | | | | | This change eliminates a system initialization dependentcy which resulted in an application without a file system or console referencing errno being forced to include the code to open(/dev/console), close(), atexit(), and the unmount infrastructure. Closes #4439.
* telnetd.c: Remove RTEMS_NETWORKING checkVijay Kumar Banerjee2021-05-201-10/+1
| | | | Set the priority manually to make telnetd compatible with the
* score: Simplify thread queue timeout handlingSebastian Huber2021-05-1810-44/+88
| | | | | | | Add Thread_queue_Context::timeout_absolute to specify an absolute or relative timeout. This avoid having to get the current time twice for timeouts relative to the current time. It moves also functionality to common code.
* posix: Fix use of clock for relative timesSebastian Huber2021-05-181-13/+18
| | | | Close #4426.
* score: Add _CPU_Context_switch_no_return()Sebastian Huber2021-05-189-5/+56
| | | | | | | | | | | The __builtin_unreachable() cannot be used with current GCC versions to tell the compiler that a function does not return to the caller, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99151 Add a no return variant of _CPU_Context_switch() to avoid generation of dead code in _Thread_Start_multitasking() if RTEMS was built with SMP support enabled.
* score: Move _Thread_queue_Queue_get_name_and_id()Sebastian Huber2021-05-173-36/+77
| | | | | | | | | | Move this diagnostic function to a separate file since it does not provide a core function of the system. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.