[PATCH 2/8] score: Fix allocation size calculation

2020-09-24 Thread Sebastian Huber
The previous multiplication error check is broken on 64-bit machines. Use the recommended check from SEI CERT C Coding Standard, "INT30-C. Ensure that unsigned integer operations do not wrap". Make sure the message size computation does not overflow. Update #4007. --- cpukit/score/src/coremsg.c

[PATCH 8/8] rtems: Add rtems_message_queue_construct()

2020-09-24 Thread Sebastian Huber
In contrast to message queues created by rtems_message_queue_create(), the message queues constructed by this directive use a user-provided message buffer storage area. Add RTEMS_MESSAGE_QUEUE_BUFFER() to define a message buffer type for message buffer storage areas. Update #4007. --- cpukit/Mak

[PATCH 0/8] Add rtems_message_queue_construct()

2020-09-24 Thread Sebastian Huber
In contrast to message queues created by rtems_message_queue_create(), the message queues constructed by this directive use a user-provided message buffer storage area. Add RTEMS_MESSAGE_QUEUE_BUFFER() to define a message buffer type for message buffer storage areas. Sebastian Huber (8): score:

[PATCH 1/8] score: Use RTEMS_ALIGN_UP()

2020-09-24 Thread Sebastian Huber
Update #4007. --- cpukit/score/src/coremsg.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpukit/score/src/coremsg.c b/cpukit/score/src/coremsg.c index fc6f9eba03..af8dbd6583 100644 --- a/cpukit/score/src/coremsg.c +++ b/cpukit/score/src/coremsg.c @@ -51,7 +51,6 @@ bo

[PATCH 3/8] score: Gather message queue control initialization

2020-09-24 Thread Sebastian Huber
Initialize the structure in a single code block after the error checks and calculations. Update #4007. --- cpukit/score/src/coremsg.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/cpukit/score/src/coremsg.c b/cpukit/score/src/coremsg.c index 137

[PATCH 7/8] rtems: Remove Message_queue_Control::attribute_set

2020-09-24 Thread Sebastian Huber
Add Message_queue_Control::is_global if RTEMS_MULTIPROCESSING is defined. This reduces the Message_queue_Control size in standard RTEMS configurations. Update #4007. --- cpukit/include/rtems/rtems/messagedata.h | 6 -- cpukit/libmisc/monitor/mon-queue.c | 16 +++- cpukit/r

[PATCH 6/8] score: Add

2020-09-24 Thread Sebastian Huber
Move the CORE_message_queue_Buffer definition to a separate header file to be able to use it independent of the remaining Message Queue Handler API. Change license to BSD-2-Clause according to file history. Update #3053. Update #4007. --- cpukit/headers.am | 1 + cpukit

[PATCH 5/8] score: Simplify CORE_message_queue_Buffer

2020-09-24 Thread Sebastian Huber
Merge CORE_message_queue_Buffer structure into CORE_message_queue_Buffer_control. Use a zero-length array for the actual message buffer. This reduces the structure size on all targets. Update #4007. --- cpukit/include/rtems/confdefs/wkspace.h | 2 +- cpukit/include/rtems/rtems/msgmp.h |

[PATCH 4/8] score: Improve _CORE_message_queue_Initialize()

2020-09-24 Thread Sebastian Huber
Return a status code and differentiate between error conditions. Update #4007. --- cpukit/include/rtems/score/coremsgimpl.h | 29 cpukit/include/rtems/score/status.h | 4 cpukit/posix/src/mqueueopen.c| 17 +++--- cpukit/rtems/src/msgqcreate.

Re: Need help debugging sp02.exe run on Strong APA scheduler

2020-09-24 Thread Richi Dubey
> > Deleting a suspended thread would not require any actions on the Ready set > of threads, for example. This is exactly what I was wondering. I'll look into data structures as you suggested. Thanks. On Thu, Sep 24, 2020 at 2:57 AM Joel Sherrill wrote: > > > On Wed, Sep 23, 2020 at 11:54 AM

Re: [PATCH 2/8] score: Fix allocation size calculation

2020-09-24 Thread Gedare Bloom
On Thu, Sep 24, 2020 at 6:13 AM Sebastian Huber wrote: > > The previous multiplication error check is broken on 64-bit machines. Use the > recommended check from SEI CERT C Coding Standard, "INT30-C. Ensure that > unsigned integer operations do not wrap". > > Make sure the message size computatio

Re: [PATCH 4/8] score: Improve _CORE_message_queue_Initialize()

2020-09-24 Thread Gedare Bloom
On Thu, Sep 24, 2020 at 6:13 AM Sebastian Huber wrote: > > Return a status code and differentiate between error conditions. > > Update #4007. > --- > cpukit/include/rtems/score/coremsgimpl.h | 29 > cpukit/include/rtems/score/status.h | 4 > cpukit/posix/src/mq

Re: [PATCH 7/8] rtems: Remove Message_queue_Control::attribute_set

2020-09-24 Thread Gedare Bloom
There should be an mptest added for global mq On Thu, Sep 24, 2020 at 6:13 AM Sebastian Huber wrote: > > Add Message_queue_Control::is_global if RTEMS_MULTIPROCESSING is defined. > This > reduces the Message_queue_Control size in standard RTEMS configurations. > > Update #4007. > --- > cpukit/

Re: [PATCH 8/8] rtems: Add rtems_message_queue_construct()

2020-09-24 Thread Gedare Bloom
We'll need docs. The test case looks incomplete. Might want to duplicate the current tests for constructed queues to exercise default, priority; I guess the GLOBAL attribute is meaningless in an sptest. Everything else here looks fine beside what I commented on in the earlier patches. On Thu, Sep

configure options translated to waf config.ini?

2020-09-24 Thread Joel Sherrill
Hi I can't find any documentation which guides translating a RTEMS configure command into the appropriate set of options in a config.ini file for waf. The only example I could find has BUILD_TESTS which implies it builds all tests rather than just samples. Guidance on translating configure option

Re: [PATCH 2/8] score: Fix allocation size calculation

2020-09-24 Thread Gedare Bloom
On Thu, Sep 24, 2020 at 10:30 AM Gedare Bloom wrote: > > On Thu, Sep 24, 2020 at 6:13 AM Sebastian Huber > wrote: > > > > The previous multiplication error check is broken on 64-bit machines. Use > > the > > recommended check from SEI CERT C Coding Standard, "INT30-C. Ensure that > > unsigned i

Re: configure options translated to waf config.ini?

2020-09-24 Thread Chris Johns
On 25/9/20 2:48 am, Joel Sherrill wrote: > I can't find any documentation which guides translating a  > RTEMS configure command into the appropriate set of > options in a config.ini file for waf. The only example I could > find has BUILD_TESTS which implies it builds all tests  > rather than just s

Re: [EXTERNAL] Re: running pc686 samples on QEMU on RTEMS 5.1?

2020-09-24 Thread Cudmore, Alan P. (GSFC-5820)
Hi Karel, Your suggested options fixed it! Our next release should be compatible with RTEMS 5.1. The documentation is great too.. As a long time RTEMS user, I often fail to check the docs first! Thanks, Alan On 9/23/20, 5:15 PM, "Karel Gardas" wrote: On 9/23/20 11:02 PM, Cudmore, Alan P.

[PATCH 1/3] Move all python commands to use env python

2020-09-24 Thread chrisj
From: Chris Johns - If you host does not provide a python command consult the User manual for ways you can run the python commands. - Full package paths are being used to avoid namespace pollution and crosstalk. --- tester/rt/cmd-run.py => misc/__init__.py | 18 +-- misc/rtems-boot

[PATCH 2/3] rtemstoolkit/configuration: Treat an empty variable as an empty list

2020-09-24 Thread chrisj
From: Chris Johns --- rtemstoolkit/configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtemstoolkit/configuration.py b/rtemstoolkit/configuration.py index a73fd9b..1f57de4 100644 --- a/rtemstoolkit/configuration.py +++ b/rtemstoolkit/configuration.py @@ -140,7 +1

[PATCH 3/3] rtemstoolkit/dwarf: Dump the DIE offset

2020-09-24 Thread chrisj
From: Chris Johns --- rtemstoolkit/rld-dwarf.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rtemstoolkit/rld-dwarf.cpp b/rtemstoolkit/rld-dwarf.cpp index fc4399a..d9ac6f3 100644 --- a/rtemstoolkit/rld-dwarf.cpp +++ b/rtemstoolkit/rld-dwarf.cpp @@ -1429,7 +1429,11 @@

Re: [PATCH 2/8] score: Fix allocation size calculation

2020-09-24 Thread Sebastian Huber
On 24/09/2020 18:50, Gedare Bloom wrote: + /* Make sure the memory allocation size computation does not overflow */ + if ( maximum_pending_messages > SIZE_MAX / buffer_size ) { optimization: can we use mult instead? if ( maximum_pending_messages * buffer_size > SIZE_MAX ) save a few cycles

Re: [PATCH 2/8] score: Fix allocation size calculation

2020-09-24 Thread Sebastian Huber
On 24/09/2020 18:30, Gedare Bloom wrote: +#define MESSAGE_SIZE_LIMIT \ + ( SIZE_MAX - sizeof( uintptr_t ) - 1 \ Minor: should it be - ( sizeof( uintptr_t ) - 1 )? Or: - sizeof(uintptr_t) + 1 The alignment up can add at most sizeof(uintptr_t)-1 bytes overhead I think is what this is trying to

Re: [PATCH 4/8] score: Improve _CORE_message_queue_Initialize()

2020-09-24 Thread Sebastian Huber
On 24/09/2020 18:39, Gedare Bloom wrote: + status = _CORE_message_queue_Initialize( +&the_mq->Message_queue, +CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO, +attr->mq_maxmsg, +attr->mq_msgsize + ); + + if ( status != STATUS_SUCCESSFUL ) { _POSIX_Message_queue_Free( the_mq );

Re: [PATCH 7/8] rtems: Remove Message_queue_Control::attribute_set

2020-09-24 Thread Sebastian Huber
On 24/09/2020 18:45, Gedare Bloom wrote: There should be an mptest added for global mq This should be already covered by tests mp09 .. mp13. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

[PATCH] user: Add migration hints from old build system

2020-09-24 Thread Sebastian Huber
Update #3818. --- user/bld/index.rst | 84 -- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/user/bld/index.rst b/user/bld/index.rst index b47cee8..376475c 100644 --- a/user/bld/index.rst +++ b/user/bld/index.rst @@ -1,7 +1,7 @@ .. SPDX-