[PATCH] c-user: Use rubric for configuration options

2021-11-15 Thread Sebastian Huber
Use a rubric instead of a definition list for the application configuration options similar to the directive documentation pages. For direcives and application configuration options use the same rubric order. Generalize value constraints to constraints. This patch does not change hand written co

[PATCH v2 4/4] build: Add --rtems-version command line option

2021-11-15 Thread Sebastian Huber
Close #4548. --- wscript | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index ac0ef2f9e1..77269f126c 100755 --- a/wscript +++ b/wscript @@ -1260,6 +1260,11 @@ def options(ctx): metavar="UID", help="the UID of the t

[PATCH v2 1/4] Revert "optvermaj.yml: Allow __RTEMS_MAJOR__ to be overridden so RTEMS 7 tools can be tested"

2021-11-15 Thread Sebastian Huber
This reverts commit d1bbfbea5f60f552b2b3138bb1df35c3372f2461. --- spec/build/cpukit/optvermaj.yml | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spec/build/cpukit/optvermaj.yml b/spec/build/cpukit/optvermaj.yml index e1a5eae5b3..2596e6ef6a 100644 --- a/spec/build/cpuki

[PATCH v2 2/4] build: Support command line specified options

2021-11-15 Thread Sebastian Huber
Update #4548. --- wscript | 40 ++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index 8903f1f97a..ac0ef2f9e1 100755 --- a/wscript +++ b/wscript @@ -958,6 +958,15 @@ class OptionItem(Item): value = self.default_v

[PATCH v2 3/4] build: Optional __RTEMS_MAJOR__ via command line

2021-11-15 Thread Sebastian Huber
Update #4548. --- spec/build/cpukit/optvermaj.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/build/cpukit/optvermaj.yml b/spec/build/cpukit/optvermaj.yml index 2596e6ef6a..9dbded9e64 100644 --- a/spec/build/cpukit/optvermaj.yml +++ b/spec/build/cpukit/optvermaj.yml @@

Re: [rtems-tools] tester: Update jobs configuration

2021-11-15 Thread Ryan Long
ping On 11/1/2021 5:31 PM, Ryan Long wrote: ping -Original Message- From: Ryan Long Sent: Wednesday, October 20, 2021 3:06 PM To: devel@rtems.org Cc: Ryan Long Subject: [rtems-tools] tester: Update jobs configuration Allow for default_jobs and max_jobs to be specified in the BSP's co

Re: [PATCH] waf: Add --rtems-version as a configure option

2021-11-15 Thread Chris Johns
On 15/11/21 7:09 pm, Sebastian Huber wrote: > On 14/11/2021 23:42, Chris Johns wrote: >>> With this approach you don't give the user the ability to change everything. >>> However, what can be change is defined by the build specification and not >>> the >>> wscript. >> I understand the reason howev

[PATCH] TraceConverter.cc: Add final catch for exceptions

2021-11-15 Thread Ryan Long
CID 1471639: Add catch for exception Closes #4501 --- tester/covoar/TraceConverter.cc | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tester/covoar/TraceConverter.cc b/tester/covoar/TraceConverter.cc index 7770b11..4c62b06 100644 --- a/tester/covoar/TraceConv

[PATCH] config: CONFIGURE_DISABLE_BSP_SETTINGS

2021-11-15 Thread Sebastian Huber
Evaluate CONFIGURE_DISABLE_BSP_SETTINGS for each affected application configuration option. This makes the code easier to review since the influence of CONFIGURE_DISABLE_BSP_SETTINGS is locally visible in the code. --- cpukit/include/rtems/confdefs/bsp.h| 15 ++- cpukit/includ

Re: [PATCH v2] c-user: Document new clock manager directives

2021-11-15 Thread Sebastian Huber
On 11/11/2021 08:02, Sebastian Huber wrote:> On 09/11/2021 13:06, Sebastian Huber wrote: On 09/11/2021 08:50, Sebastian Huber wrote: On 09/11/2021 08:41, Chris Johns wrote: We could also use something like this: static inline struct timespec rtems_clock_get_realtime(void) {    struct timespec

[PATCH 20/27] score: Move _Scheduler_Block_node()

2021-11-15 Thread Sebastian Huber
Move _Scheduler_Block_node() into _Scheduler_SMP_Block(). This simplifies the code and makes it easier to review. Update #4531. --- cpukit/include/rtems/score/schedulerimpl.h| 56 --- cpukit/include/rtems/score/schedulersmpimpl.h | 71 --- 2 files changed, 46 inse

[PATCH 22/27] score: Remove victim thread from CPU allocation

2021-11-15 Thread Sebastian Huber
Update #4531. --- cpukit/include/rtems/score/schedulersmpimpl.h | 113 -- cpukit/score/src/scheduleredfsmp.c| 22 ++-- cpukit/score/src/schedulerstrongapa.c | 10 +- 3 files changed, 65 insertions(+), 80 deletions(-) diff --git a/cpukit/include/rtems/score/sc

[PATCH 15/27] score: Add SMP scheduler make/clean sticky

2021-11-15 Thread Sebastian Huber
This patch fixes the following broken behaviour: While a thread is scheduled on a helping scheduler, while it does not own a MrsP semaphore, if it obtains a MrsP semaphore, then no scheduler node using an idle thread and the ceiling priority of the semaphore is unblocked for the home sched

[PATCH 16/27] score: Rework idle handling in SMP schedulers

2021-11-15 Thread Sebastian Huber
This patch fixes an issue with the idle thread handling in the SMP scheduler framework used for the MrsP locking protocol. The approach to use a simple chain of unused idle threads is broken for schedulers which support thread to processor affinity. The reason is that the thread to processor affi

[PATCH 08/27] score: Add missing idle thread exchanges

2021-11-15 Thread Sebastian Huber
Update #4531. --- cpukit/include/rtems/score/schedulersmpimpl.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/cpukit/include/rtems/score/schedulersmpimpl.h b/cpukit/include/rtems/score/schedulersmpimpl.h index 944b4fc976..a074b53a16 100644 --- a/cpukit/include/rtems/scor

[PATCH 23/27] score: _Scheduler_SMP_Schedule_highest_ready()

2021-11-15 Thread Sebastian Huber
Simplify callers of _Scheduler_SMP_Schedule_highest_ready(). Move the node state change and the extraction from scheduled into _Scheduler_SMP_Schedule_highest_ready(). Move the idle thread release to the caller which have more information about the presence of an idle thread. Update #4531. ---

[PATCH 27/27] score: Restrict affinity for EDF SMP scheduler

2021-11-15 Thread Sebastian Huber
The SMP EDF scheduler supports a one-to-one and one-to-all thread to processor affinity. It accepted affinity sets which are a proper subset of the online processor containing at least two processors owned by the scheduler. In this case it used a one-to-one thread to processor affinity. This leads

[PATCH 10/27] score: Remove return value from enqueue scheduled

2021-11-15 Thread Sebastian Huber
The return value was unused. Remove it. Update #4531. --- cpukit/include/rtems/score/schedulersmpimpl.h | 56 ++- cpukit/score/src/scheduleredfsmp.c| 4 +- .../score/src/schedulerpriorityaffinitysmp.c | 4 +- cpukit/score/src/schedulerprioritysmp.c | 4 +- c

[PATCH 11/27] score: Use extract from scheduled callbacks

2021-11-15 Thread Sebastian Huber
Use the extract from scheduled callback provided by the scheduler implementation in the SMP scheduler framework. Update #4531. --- cpukit/include/rtems/score/schedulersmpimpl.h | 25 +++ cpukit/score/src/scheduleredfsmp.c| 5 .../score/src/schedulerpriorityaffini

[PATCH 13/27] score: Optimize SMP EDF move to ready operation

2021-11-15 Thread Sebastian Huber
If a node is moved from the scheduled chain to the ready queue, then we know that it is the highest priority ready node. So, it can be prepended to the ready queue without doing any comparisons. Update #4531. --- cpukit/score/src/scheduleredfsmp.c | 20 +--- 1 file changed, 13 in

[PATCH 24/27] score: Rework ask for help requests

2021-11-15 Thread Sebastian Huber
Process ask for help requests on the current processor. This avoids using inter-processor interrupts to make the system behaviour a bit more predictable. Update #4531. --- cpukit/include/rtems/score/schedulerimpl.h| 24 cpukit/include/rtems/score/schedulersmpimpl.h | 113 +-

[PATCH 25/27] score: Fix assertion in SMP scheduler framework

2021-11-15 Thread Sebastian Huber
Properly assert that the scheduled chain is not empty. Fix formatting. Close #4531. --- cpukit/include/rtems/score/schedulersmpimpl.h | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cpukit/include/rtems/score/schedulersmpimpl.h b/cpukit/include/rtems/score/sc

[PATCH 21/27] score: Move _Scheduler_Unblock_node()

2021-11-15 Thread Sebastian Huber
Move _Scheduler_Unblock_node() into _Scheduler_SMP_Unblock(). This simplifies the code and makes it easier to review. Update #4531. --- cpukit/include/rtems/score/schedulerimpl.h| 42 cpukit/include/rtems/score/schedulersmpimpl.h | 64 ++- 2 files changed, 35 ins

[PATCH 17/27] score: Add node to insert to Chain_Node_order

2021-11-15 Thread Sebastian Huber
This allows to use additional members of the nodes for comparision. Update #4534. --- cpukit/include/rtems/score/chainimpl.h| 11 +++--- .../include/rtems/score/schedulersimpleimpl.h | 13 --- cpukit/include/rtems/score/schedulersmpimpl.h | 36 ++- cpukit/score/src/cor

[PATCH 19/27] score: Simplify _Scheduler_SMP_Yield()

2021-11-15 Thread Sebastian Huber
There is not need to actively ask for help in a yield operation. The helping is already done on demand by the other scheduler operations. --- cpukit/include/rtems/score/schedulersmpimpl.h | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cpukit/include/rtems/score/sc

[PATCH 14/27] score: Add SMP scheduler idle exchange callback

2021-11-15 Thread Sebastian Huber
Update #4531. --- cpukit/include/rtems/score/schedulersmpimpl.h | 4 1 file changed, 4 insertions(+) diff --git a/cpukit/include/rtems/score/schedulersmpimpl.h b/cpukit/include/rtems/score/schedulersmpimpl.h index 499cff5c6c..54ed976e85 100644 --- a/cpukit/include/rtems/score/schedulersmpim

[PATCH 09/27] score: Scheduler insert after move

2021-11-15 Thread Sebastian Huber
Insert nodes after moving the second node to reduce the items in the data structure for the insert operation. This also avoids having two nodes for the same processor inserted into the scheduled chain. Update #4531. --- cpukit/include/rtems/score/schedulersmpimpl.h | 10 +- 1 file change

[PATCH 06/27] score: Simplify _Scheduler_Exchange_idle_thread()

2021-11-15 Thread Sebastian Huber
Remove superfluous idle parameter. Update #4531. --- cpukit/include/rtems/score/schedulerimpl.h| 16 +--- cpukit/include/rtems/score/schedulersmpimpl.h | 12 ++-- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/cpukit/include/rtems/score/schedulerimpl.h b

[PATCH 07/27] score: Add missing idle thread releases

2021-11-15 Thread Sebastian Huber
Update #4531. --- cpukit/include/rtems/score/schedulersmpimpl.h | 12 1 file changed, 12 insertions(+) diff --git a/cpukit/include/rtems/score/schedulersmpimpl.h b/cpukit/include/rtems/score/schedulersmpimpl.h index a1a048d4ed..944b4fc976 100644 --- a/cpukit/include/rtems/score/sche

[PATCH 05/27] score: Change _Scheduler_Try_to_schedule_node()

2021-11-15 Thread Sebastian Huber
Add the victim node as parameter instead of the idle thread. Update #4531. --- cpukit/include/rtems/score/schedulerimpl.h| 4 ++-- cpukit/include/rtems/score/schedulersmpimpl.h | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpukit/include/rtems/score/schedulerimp

[PATCH 18/27] score: Fix SMP EDF priority group ordering

2021-11-15 Thread Sebastian Huber
The SMP EDF scheduler supports one-to-one and one-to-all thread to processor affinities. The one-to-one thread to processor affinity introduces a constraint on the ordering of threads. The implementation uses one ready queue for threads which have a one-to-all affinity and one for each one-to-one

[PATCH 26/27] rtems: Fix rtems_scheduler_remove_processor()

2021-11-15 Thread Sebastian Huber
Return an error status for the following error condition in rtems_scheduler_remove_processor(): While an attempt is made to remove a processor from a scheduler, while the processor is the only processor owned by the scheduler, if a thread exists which uses the scheduler as a helping scheduler, the

[PATCH 12/27] score: Rework affine ready queue handling

2021-11-15 Thread Sebastian Huber
Rework the handling of the affine ready queue for the EDF SMP scheduler. Do the queue handling in the node insert, move, and extract operations. Remove the queue handling from _Scheduler_EDF_SMP_Allocate_processor(). Update #4531. --- cpukit/include/rtems/score/scheduleredfsmp.h | 13 ++- cpukit

[PATCH 02/27] score: Add red-black tree append/prepend

2021-11-15 Thread Sebastian Huber
These functions are a faster alternative to _RBTree_Insert_inline() if it is known that the new node is the maximum/minimum node. Update #4531. --- cpukit/include/rtems/score/rbtreeimpl.h | 26 +++ cpukit/score/src/rbtreeappend.c | 58 + cpukit/score/src/rb

[PATCH 04/27] score: Not set CPU in _Scheduler_Use_idle_thread()

2021-11-15 Thread Sebastian Huber
Do not set the CPU of the idle thread in _Scheduler_Use_idle_thread(). This helps to use _Scheduler_Try_to_schedule_node() under more general conditions in the future, for example in case the owner and user of a node are not the same. Update #4531. --- cpukit/include/rtems/score/schedulerimpl.h

[PATCH 03/27] score: Rename _Scheduler_Set_idle_thread()

2021-11-15 Thread Sebastian Huber
Rename _Scheduler_Set_idle_thread() in _Scheduler_Node_set_idle_user() and move it to . Update #4531. --- cpukit/include/rtems/score/schedulerimpl.h| 24 ++- .../include/rtems/score/schedulernodeimpl.h | 21 2 files changed, 23 insertions(+), 22 deletions(-)

[PATCH 01/27] score: Simplify _Scheduler_Generic_block()

2021-11-15 Thread Sebastian Huber
If we block the executing thread and it is not the heir thread, then there is no need to run the schedule operation. The scheduler already selected a new heir. --- cpukit/include/rtems/score/schedulerimpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/include/rtems/s

[PATCH 00/27] Fix several SMP related scheduler bugs

2021-11-15 Thread Sebastian Huber
This patch set addresses several bugs related to SMP schedulers: * https://devel.rtems.org/ticket/4531 * https://devel.rtems.org/ticket/4532 * https://devel.rtems.org/ticket/4534 * https://devel.rtems.org/ticket/4544 * https://devel.rtems.org/ticket/4545 Tests for scenarios of this patch set

[PATCH 3/6] score: Simplify thread wait state handling

2021-11-15 Thread Sebastian Huber
Remove the THREAD_WAIT_STATE_READY_AGAIN and simply use the initial value to indicate that a thread does not wait on something. Rename THREAD_WAIT_FLAGS_INITIAL to THREAD_WAIT_STATE_READY. This change is necessary so that _Thread_Continue() can be called for threads which never waited on somethin

[PATCH 5/6] score: _Thread_queue_Surrender_no_priority()

2021-11-15 Thread Sebastian Huber
Simplify _Thread_queue_Surrender_no_priority() and use _Thread_queue_Resume(). Update #4546. --- cpukit/score/src/threadqenqueue.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c index e015

[PATCH 1/6] score: Remove thread timer earlier

2021-11-15 Thread Sebastian Huber
The earlier we remove the thread timer the less likely is a superfluous thread timeout processing. Update #4546. --- cpukit/score/src/threadrestart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c index 1

[PATCH 2/6] score: Add _Thread_MP_Extract_proxy()

2021-11-15 Thread Sebastian Huber
Remove _Thread_queue_Extract_with_proxy() and move the proxy extraction to _Thread_MP_Extract_proxy(). Move similar code blocks of the previous caller of _Thread_queue_Extract_with_proxy() to helper functions. Update #4546. --- cpukit/include/rtems/score/objectdata.h| 2 +- cpukit/include/r

[PATCH 4/6] score: Move _Thread_queue_Extract()

2021-11-15 Thread Sebastian Huber
Move _Thread_queue_Extract() since this function is not used by the core services (threads, semaphores, mutexes, message queues). Update #4546. --- cpukit/include/rtems/score/threadqimpl.h | 7 ++- cpukit/score/src/threadqenqueue.c| 37 ++- cpukit/score/src/threadqextract.c

[PATCH 6/6] score: Properly continue the thread during restart

2021-11-15 Thread Sebastian Huber
The _Thread_queue_Extract() does not deal with potential priority updates and the SMP locking protocol handling. Use _Thread_queue_Continue(). For the POSIX signals processing this is currently probably unnecessary, however, the use case is similar to the restart so use the same appoach. Close #

[PATCH 0/6] Fix rtems_task_restart() in combination with priority inheritance, etc.

2021-11-15 Thread Sebastian Huber
Consider the following scenario. Let a high priority task H wait on a priority inheritance mutex M owned by a low priority task L. Restart task H. This should remove the priority inherited by H from L. This is currently not the case and the patch set fixes this. A test for this is in the new valid

Re: Interested in working on ticket #2902, #4328, or #4334

2021-11-15 Thread Prateek Pardeshi
Hello Christian and Joel, On Fri, 12 Nov 2021 at 20:50, Christian MAUDERER wrote: > > Hello Prateek Pardeshi and Joel, > > Am 11.11.21 um 19:06 schrieb Joel Sherrill: > > On Thu, Nov 11, 2021 at 10:34 AM Prateek Pardeshi > > wrote: > >> > >> Hello Everyone, > >> > >> I doubt that my email went i

Re: Interested in working on ticket #2902, #4328, or #4334

2021-11-15 Thread Prateek Pardeshi
Hello Everyone, On Fri, 12 Nov 2021 at 17:23, Matthew Joyce wrote: > > Hi Prateek, > > From the new methods that were added to the latest draft version of the POSIX standard back around April, you might want to look at posix_getdents, sem_clockwait, and ppoll. Those ones are still waiting to be a

Re: [PATCH] waf: Add --rtems-version as a configure option

2021-11-15 Thread Sebastian Huber
On 14/11/2021 23:42, Chris Johns wrote: With this approach you don't give the user the ability to change everything. However, what can be change is defined by the build specification and not the wscript. I understand the reason however you would need to implement it to show how it is done? Can w