[PATCH] Correct initial POSIX signals mask

Joel Sherrill joel at rtems.org
Thu Sep 12 14:12:37 UTC 2019


On Thu, Sep 12, 2019 at 8:06 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> On 11/09/2019 01:11, Joel Sherrill wrote:
> > +  if (!_System_state_Is_up(_System_state_Get())) {
> > +    if (_Objects_Get_API(created->Object.id) == OBJECTS_INTERNAL_API) {
>
> You have to add a couple of spaces to meet the coding style.

Gotcha.

> I would not use the system state, this could be a bit brittle on SMP
> systems. Can't you use the executing thread instead, e.g. if
> _Objects_Get_API( executing->Object.id ) == OBJECTS_INTERNAL_API, then
> api->signals_unblocked = SIGNAL_ALL_MASK?

I have changed it to

   if created == internal
     block all
   else if executing == internal
     unblock all for init threads/tasks
   else
     inherit

All tasks pass and I think this logic is correct.

V2 will be posted shortly.

Thanks for the comments.

--joel

> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list