[PATCH v5] cpukit/librcxx: Add a C++ thread interface with attributes

Joel Sherrill joel at rtems.org
Tue Oct 6 22:05:51 UTC 2020


On Tue, Oct 6, 2020 at 4:58 PM Chris Johns <chrisj at rtems.org> wrote:

> On 7/10/20 12:33 am, Joel Sherrill wrote:
> > One last pile on.
>
> No problem and thanks. The reviews are great.
>
> > It is minor but you said "scheduler modes" for
> > inherit/explicit.  I couldn't place what bothered me about that wording.
> This
> > morning it hit me that modes is a Classic API term. I think your
> comments could
> > talk about it in these terms and use the POSIX terms like scheduling
> attributes,
> > policy, etc.
> >
> > PTHREAD_INHERIT_SCHED
> >     Specifies that the thread scheduling attributes shall be inherited
> from the
> >     creating thread, and the scheduling attributes in
> this /attr/ argument shall
> >     be ignored.
> > PTHREAD_EXPLICIT_SCHED
> >     Specifies that the thread scheduling attributes shall be set to the
> >     corresponding values from this attributes object.
>
> How about this ...
>
>       /**
>        * The scheduler attributes.
>        */
>       enum sched_attr {
>         sched_inherit,    /**< Inherit the scheduler attributes
>                            *   from the creating thread. */
>         sched_explicit    /**< Explicitly set the scheduler to these
>                            *   attributes. */
>       };
>
>       /**
>        * Get the attributes' scheduler attribute for the thread.
>        *
>        * @return sched_attr The attributes' scheduler attribute
>        */
>       sched_attr get_scheduler_attr () const;
>
> etc?
>

That's good. It's easy to mix terminology from the various APIs.

--joel

>
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201006/b904ff9f/attachment-0001.html>


More information about the devel mailing list