[PATCH 05/13] posix: Remove superfluous check

Joel Sherrill joel at rtems.org
Thu Feb 18 19:25:57 UTC 2021


On Thu, Feb 18, 2021 at 11:21 AM Gedare Bloom <gedare at rtems.org> wrote:

> On Wed, Feb 17, 2021 at 12:31 PM Sebastian Huber
> <sebastian.huber at embedded-brains.de> wrote:
> >
> > The api pointer is never NULL.
> >
> > Update #4244.
> > ---
> >  cpukit/posix/src/psignalunblockthread.c | 6 ------
> >  1 file changed, 6 deletions(-)
> >
> > diff --git a/cpukit/posix/src/psignalunblockthread.c
> b/cpukit/posix/src/psignalunblockthread.c
> > index 63ed823ab3..a1af20a5af 100644
> > --- a/cpukit/posix/src/psignalunblockthread.c
> > +++ b/cpukit/posix/src/psignalunblockthread.c
> > @@ -111,12 +111,6 @@ static void _POSIX_signals_Action_handler(
> >     */
> >    hold_errno = executing->Wait.return_code;
> >
> > -  /*
> > -   * api may be NULL in case of a thread close in progress
> > -   */
> > -  if ( !api )
> > -    return;
> > -
> I believe you, but should we replace this with an assert for now?
>

And a comment explaining why it can't be NULL.

>
> >    /*
> >     *  In case the executing thread is blocked or about to block on
> something
> >     *  that uses the thread wait information, then this is a kernel bug.
> > --
> > 2.26.2
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210218/16740b9e/attachment-0001.html>


More information about the devel mailing list