summaryrefslogtreecommitdiffstats
path: root/cpukit (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* posix: Use RTEMS_POSIX_API in clock_nanosleep()Sebastian Huber2021-05-171-0/+5
| | | | | It is only possible to get interrupted by a POSIX signal if RTEMS_POSIX_API is defined.
* posix: Move clock_nanosleep()Sebastian Huber2021-05-173-91/+117
| | | | | | | Move clock_nanosleep() to a separate file to avoid a dependency on errno which pulls in the Newlib reentrancy support. This is an issue since most parts which are pulled in cannot be garbage collected by the linker due to the system initialization linker set.
* score: Add and use _Per_CPU_Is_ISR_in_progress()Sebastian Huber2021-05-174-13/+22
| | | | | Add _Per_CPU_Is_ISR_in_progress() as an optimized version of _ISR_Is_in_progress().
* score: Improve parameters in _Thread_Change_life()Sebastian Huber2021-05-172-22/+29
|
* rtems: Fix task restart within interrupt contextSebastian Huber2021-05-143-74/+17
| | | | | | | | | | | rtems_task_restart() may be called from within interrupt context. So checking only that the thread to restart is equal to the executing thread is insufficient to determine a self restart. We have to also check that no ISR is in progress. Merge _Thread_Restart_other() and _Thread_Restart_self() into one _Thread_Restart() since they share a lot of common code. Close #4412.
* rtems: Always set the real priority during restartSebastian Huber2021-05-141-26/+32
| | | | | | | Unconditionally set the real priority of the task to its initial priority during a task restart. Close #4411.
* score: Return status in _Thread_Restart_other()Sebastian Huber2021-05-143-12/+16
| | | | This simplifies rtems_task_restart().
* rtems: Check entry point in rtems_task_start()Sebastian Huber2021-05-141-0/+4
| | | | Close #4410.
* rtems: Add TOD_Ticks_validationSebastian Huber2021-05-142-15/+24
| | | | | | Replace defines with an enum. Update #4406.
* rtems: Constify rtems_task_wake_when()Sebastian Huber2021-05-126-16/+28
| | | | | | | | | | | | | | | | Add a parameter to _TOD_Validate() to disable the validation of the ticks member. There are two reasons for this change. Firstly, in rtems_task_wake_when() was a double check for time_buffer == NULL (one in rtems_task_wake_when() and one in _TOD_Validate()). Secondly, the ticks member is ignored by rtems_task_wake_when(). This was done with a write of zero to the ticks member and thus a modification of the user-provided structure. Now the structure is no longer modified. Using a mask parameter is quite efficient. You just have to load an immediate value and there are no additional branches in _TOD_Validate(). Close #4406.
* rtems: Document rtems_task_set_scheduler() errorsSebastian Huber2021-05-121-3/+20
|
* rtems: Clarify rtems_task_get_priority() docSebastian Huber2021-05-121-2/+2
|
* rtems: Use rtems_clock_get_ticks_per_second()Sebastian Huber2021-05-121-2/+2
| | | | This avoids an integer division at runtime.
* _TOD_Validate(): Fix incorrect return codeFrank Kühndel2021-05-125-40/+51
| | | | | | | | | | | | | | | This patch fixes bug #4403. Directives * rtems_timer_fire_when() * rtems_timer_server_fire_when() * rtems_task_wake_when() are documented to return RTEMS_INVALID_ADDRESS when their time-of-day argument is NULL. But actually they return RTEMS_INVALID_CLOCK. To fix the issue this patch changes _TOD_Validate() to return a status code instead of just true/false. Close #4403
* rtems: Use _Objects_Free_nothing() for msg queuesSebastian Huber2021-05-112-6/+9
| | | | | | | | Use _Objects_Free_nothing() for rtems_message_queue_construct() to avoid unreachable code in _CORE_message_queue_Close() in case only user-provided message buffers are used. Update #4007.
* score: Rename _Stack_Free_nothing()Sebastian Huber2021-05-117-16/+16
| | | | | | | Rename _Stack_Free_nothing() in _Objects_Free_nothing() to make it reusable for the message queue buffers. Update #4007.