Re: [PATCH] score: Add _CPU_Context_switch_no_return()

2021-05-17 Thread Sebastian Huber
On 18/05/2021 00:07, Joel Sherrill wrote: Does this impact the porting guide I added this to cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h: /** * @brief Peforms a context switch from the executing thread to the heir thread * and does not return. * * @addtogroup

Re: RFC: Separate Header for Some Porting Methods

2021-05-17 Thread Sebastian Huber
On 18/05/2021 00:12, Joel Sherrill wrote: Hi In working on the Microblaze port, it occurred to me that the prototypes for the context switch methods are always the same. The structures vary, not the signatures. What do you all think of making a separate header that can be included from

Re: Use GCC 11 for RTEMS 6?

2021-05-17 Thread Chris Johns
On 3/5/21 6:19 pm, Sebastian Huber wrote: > On 03/05/2021 07:25, Chris Johns wrote: > >> On 3/5/21 3:08 pm, Sebastian Huber wrote: >>> GCC 11 was released recently: >>> >>> https://gcc.gnu.org/gcc-11/changes.html >>> >>> Should we switch to this version for RTEMS 6 in the RSB? >>> >> Do we have

RFC: Separate Header for Some Porting Methods

2021-05-17 Thread Joel Sherrill
Hi In working on the Microblaze port, it occurred to me that the prototypes for the context switch methods are always the same. The structures vary, not the signatures. What do you all think of making a separate header that can be included from various cpu.h files to avoid repeating them?

Re: [PATCH] score: Add _CPU_Context_switch_no_return()

2021-05-17 Thread Joel Sherrill
Does this impact the porting guide or any CPU supplement? On Mon, May 17, 2021 at 4:42 PM Gedare Bloom wrote: > ok to me > > On Mon, May 17, 2021 at 5:43 AM Sebastian Huber > wrote: > > > > The __builtin_unreachable() cannot be used with current GCC versions to > > tell the compiler that a

Re: [PATCH] score: Add _CPU_Context_switch_no_return()

2021-05-17 Thread Gedare Bloom
ok to me On Mon, May 17, 2021 at 5:43 AM Sebastian Huber wrote: > > 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

[PATCH] tester: Avoid TFTP race condition

2021-05-17 Thread Kinsey Moore
The u-boot TFTP client will fail a fully completed file retrieval if the final ACK gets an ICMP response that the port is unavailable which can occur if the port is closed before the ACK arrives from the client. This change causes the TFTP server to wait for the final ACK before closing the socket

Re: [PATCH 2/2] posix: Use RTEMS_POSIX_API in clock_nanosleep()

2021-05-17 Thread Gedare Bloom
Out of curiosity, should we refine this feature check internally to something specific to signals? On Mon, May 17, 2021 at 9:06 AM Joel Sherrill wrote: > > Looks ok > > On Mon, May 17, 2021 at 10:01 AM Sebastian Huber > wrote: >> >> It is only possible to get interrupted by a POSIX signal if

Re: [PATCH 1/2] posix: Move clock_nanosleep()

2021-05-17 Thread Sebastian Huber
On 17/05/2021 17:22, Joel Sherrill wrote: Are there other places where a system initialization item is combined in a file with something it shouldn't be? How would one spot it? Mixtures of the classic errno POSIX functions with the modern functions which just return a status is one spot. In

Re: [PATCH rtems-docs] bsps/imxrt: Remove superfluous options from dtc

2021-05-17 Thread Joel Sherrill
On Mon, May 17, 2021 at 10:06 AM Christian MAUDERER < christian.maude...@embedded-brains.de> wrote: > Hello Joel, > > Am 17.05.21 um 14:04 schrieb Joel Sherrill: > > > > > > On Mon, May 17, 2021, 2:35 AM Christian Mauderer > > > > wrote: > > > >

Re: [PATCH 1/2] posix: Move clock_nanosleep()

2021-05-17 Thread Joel Sherrill
On Mon, May 17, 2021 at 10:19 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 17/05/2021 17:05, Joel Sherrill wrote: > > Why doesn't per item compilation and linking avoid this dependency? > > The problem is that most parts which are pulled in cannot be garbage > collected by

Re: [PATCH 1/2] posix: Move clock_nanosleep()

2021-05-17 Thread Sebastian Huber
On 17/05/2021 17:05, Joel Sherrill wrote: Why doesn't per item compilation and linking avoid this dependency? The problem is that most parts which are pulled in cannot be garbage collected by the linker due to the system initialization linker set. -- embedded brains GmbH Herr Sebastian

Re: [PATCH] score: Move _Thread_queue_Queue_get_name_and_id()

2021-05-17 Thread Joel Sherrill
Looks ok. On Mon, May 17, 2021 at 9:59 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > 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

Re: [PATCH rtems-docs] bsps/imxrt: Remove superfluous options from dtc

2021-05-17 Thread Christian MAUDERER
Hello Joel, Am 17.05.21 um 14:04 schrieb Joel Sherrill: On Mon, May 17, 2021, 2:35 AM Christian Mauderer > wrote: The -@ option adds symbols that are used when applying an overlay. RTEMS doesn't support overlays or re-parsing of device

Re: [PATCH 1/2] posix: Move clock_nanosleep()

2021-05-17 Thread Joel Sherrill
You are free to relicense to BSD-2 if it looks clean. Why doesn't per item compilation and linking avoid this dependency? It looks OK otherwise. On Mon, May 17, 2021 at 10:01 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Move clock_nanosleep() to a separate file to avoid a

Re: [PATCH 2/2] posix: Use RTEMS_POSIX_API in clock_nanosleep()

2021-05-17 Thread Joel Sherrill
Looks ok On Mon, May 17, 2021 at 10:01 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > It is only possible to get interrupted by a POSIX signal if > RTEMS_POSIX_API is defined. > --- > cpukit/posix/src/clocknanosleep.c | 5 + > 1 file changed, 5 insertions(+) > > diff

[PATCH 1/2] posix: Move clock_nanosleep()

2021-05-17 Thread Sebastian Huber
Move clock_nanosleep() to a separate file to avoid a dependency on errno which pulls in the Newlib reentrancy support. --- cpukit/Makefile.am| 1 + cpukit/posix/src/clocknanosleep.c | 116 ++ cpukit/posix/src/nanosleep.c | 91

[PATCH 0/2] Small clock_nanosleep() improvements

2021-05-17 Thread Sebastian Huber
Sebastian Huber (2): posix: Move clock_nanosleep() posix: Use RTEMS_POSIX_API in clock_nanosleep() cpukit/Makefile.am| 1 + cpukit/posix/src/clocknanosleep.c | 121 ++ cpukit/posix/src/nanosleep.c | 91 --

[PATCH 2/2] posix: Use RTEMS_POSIX_API in clock_nanosleep()

2021-05-17 Thread Sebastian Huber
It is only possible to get interrupted by a POSIX signal if RTEMS_POSIX_API is defined. --- cpukit/posix/src/clocknanosleep.c | 5 + 1 file changed, 5 insertions(+) diff --git a/cpukit/posix/src/clocknanosleep.c b/cpukit/posix/src/clocknanosleep.c index 73b7d9c6a1..951268bc1f 100644 ---

[PATCH] score: Move _Thread_queue_Queue_get_name_and_id()

2021-05-17 Thread Sebastian Huber
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. --- cpukit/Makefile.am | 1 + cpukit/score/src/threadq.c

[PATCH v5 0/5] Add nanosecond support patch

2021-05-17 Thread Ryan Long
Hi, For this series of patches, I - fixed brace placement in utime.c and utimes.c - Changed license back to what it was in msdos_init.c Thanks, Ryan Ryan Long (5): libcsupport: Added futimens() and utimensat() libcsupport: Implement utime() in terms of utimensat() libcsupport: Implement

[PATCH v5 2/5] libcsupport: Implement utime() in terms of utimensat()

2021-05-17 Thread Ryan Long
utime() now calls utimensat() to update file access and modification timestamps. Updated license. Closes #4397 --- cpukit/libcsupport/src/utime.c | 72 +++--- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/cpukit/libcsupport/src/utime.c

[PATCH v5 1/5] libcsupport: Added futimens() and utimensat()

2021-05-17 Thread Ryan Long
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 --- cpukit/Makefile.am | 2 + cpukit/include/rtems/libio_.h

[PATCH v5 5/5] Change filesystem utime_h handler to utimens_h

2021-05-17 Thread Ryan Long
Also updated licenses. Closes #4400 --- bsps/arm/csb337/umon/tfsDriver.c| 2 +- cpukit/Makefile.am | 4 +- cpukit/include/rtems/confdefs/libio.h | 4 +- cpukit/include/rtems/imfs.h | 35 - cpukit/include/rtems/libio.h

[PATCH v5 3/5] libcsupport: Implement utimes() in terms of utimensat()

2021-05-17 Thread Ryan Long
utimes() now calls utimensat() to update file access and modification timestamps. Updated license. Closes #4398 --- cpukit/libcsupport/src/utimes.c | 63 - 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/cpukit/libcsupport/src/utimes.c

[PATCH v5 4/5] psx13: Added tests for utimensat() and futimens()

2021-05-17 Thread Ryan Long
Improved tests for utime() and utimes() and update license. Close #4399 --- testsuites/psxtests/psx13/main.c | 5 +- testsuites/psxtests/psx13/test.c | 499 +-- 2 files changed, 481 insertions(+), 23 deletions(-) diff --git

[PATCH 2/3] score: Simplify calling _Thread_Exit()

2021-05-17 Thread Sebastian Huber
Move common code into _Thread_Exit(). This enables a tail call optimization in most cases. --- cpukit/include/rtems/score/threadimpl.h | 13 ++--- cpukit/posix/src/cancel.c | 12 ++-- cpukit/posix/src/pthreadexit.c | 11 +--

[PATCH 3/3] posix: Allow pthread_cancel() from within ISRs

2021-05-17 Thread Sebastian Huber
Close #4413. --- cpukit/posix/src/cancel.c | 13 ++--- testsuites/psxtests/psxcancel01/init.c | 72 +++--- 2 files changed, 45 insertions(+), 40 deletions(-) diff --git a/cpukit/posix/src/cancel.c b/cpukit/posix/src/cancel.c index f2636e6a97..aa4a434037 100644

[PATCH 0/3] Thread exit/cancel changes

2021-05-17 Thread Sebastian Huber
Sebastian Huber (3): rtems: Return RTEMS_CALLED_FROM_ISR score: Simplify calling _Thread_Exit() posix: Allow pthread_cancel() from within ISRs cpukit/include/rtems/score/threadimpl.h | 13 +++-- cpukit/posix/src/cancel.c | 25 - cpukit/posix/src/pthreadexit.c

[PATCH 1/3] rtems: Return RTEMS_CALLED_FROM_ISR

2021-05-17 Thread Sebastian Huber
If rtems_task_delete() is called from within interrupt context, then return RTEMS_CALLED_FROM_ISR. This makes the behaviour predictable. Update #4414. --- cpukit/rtems/src/taskdelete.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git

Re: [PATCH rtems-docs] bsps/imxrt: Remove superfluous options from dtc

2021-05-17 Thread Joel Sherrill
On Mon, May 17, 2021, 2:35 AM Christian Mauderer < christian.maude...@embedded-brains.de> wrote: > The -@ option adds symbols that are used when applying an overlay. RTEMS > doesn't support overlays or re-parsing of device trees. So the symbols > only increase the size of the binary. > > The same

[PATCH] score: Add _CPU_Context_switch_no_return()

2021-05-17 Thread Sebastian Huber
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

[PATCH rtems-docs] bsps/imxrt: Remove superfluous options from dtc

2021-05-17 Thread Christian Mauderer
The -@ option adds symbols that are used when applying an overlay. RTEMS doesn't support overlays or re-parsing of device trees. So the symbols only increase the size of the binary. The same is true for the padding. It would be useful if the device tree is changed during run time which is not

Re: About EDF SMP Behaviour

2021-05-17 Thread Richi Dubey
I understand. Thanks for the quick response! On Mon, May 17, 2021 at 11:58 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > > > On 17/05/2021 08:17, Richi Dubey wrote: > > > > Can someone please explain this behavior of EDF SMP Scheduler on a 4 CPU > > system, with INIT task

Re: About EDF SMP Behaviour

2021-05-17 Thread Sebastian Huber
On 17/05/2021 08:17, Richi Dubey wrote: Can someone please explain this behavior of EDF SMP Scheduler on a 4 CPU system, with INIT task pinned to cpu 0: Before Task 3 (Priority 6, Affined to CPU 3) arrival: CPU 1 is executing: Task 1 (Priority 5, Affined to CPU 1) CPU 2 is executing:

About EDF SMP Behaviour

2021-05-17 Thread Richi Dubey
Hi, Can someone please explain this behavior of EDF SMP Scheduler on a 4 CPU system, with INIT task pinned to cpu 0: Before Task 3 (Priority 6, Affined to CPU 3) arrival: CPU 1 is executing: Task 1 (Priority 5, Affined to CPU 1) CPU 2 is executing: Task 2 (Priority 7, Affined to CPU 2) CPU 3