[PATCH] score: Compact objects class indices

Joel Sherrill joel at rtems.org
Wed May 22 13:23:23 UTC 2019


I'm OK with this.

Is the statement that the API and class numbers are not
guaranteed to be held constant across releases something
that should be explicitly in a comment or requirement?

On Wed, May 22, 2019 at 12:52 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> ---
>  cpukit/include/rtems/score/objectdata.h | 48
> +++++++++++++++++++--------------
>  1 file changed, 28 insertions(+), 20 deletions(-)
>
> diff --git a/cpukit/include/rtems/score/objectdata.h
> b/cpukit/include/rtems/score/objectdata.h
> index ce6e3c63a4..a33f9d497f 100644
> --- a/cpukit/include/rtems/score/objectdata.h
> +++ b/cpukit/include/rtems/score/objectdata.h
> @@ -50,8 +50,10 @@ typedef struct {
>   *  for RTEMS internal object classes.
>   */
>  typedef enum {
> -  OBJECTS_INTERNAL_NO_CLASS =  0,
> -  OBJECTS_INTERNAL_THREADS  =  1
> +  OBJECTS_INTERNAL_NO_CLASS = 0,
> +
> +  /* Must be one, see __Thread_Get_objects_information() */
> +  OBJECTS_INTERNAL_THREADS = 1
>  } Objects_Internal_API;
>
>  /**
> @@ -59,17 +61,20 @@ typedef enum {
>   *  for the RTEMS Classic API.
>   */
>  typedef enum {
> -  OBJECTS_CLASSIC_NO_CLASS     = 0,
> -  OBJECTS_RTEMS_TASKS          = 1,
> -  OBJECTS_RTEMS_TIMERS         = 2,
> -  OBJECTS_RTEMS_SEMAPHORES     = 3,
> -  OBJECTS_RTEMS_MESSAGE_QUEUES = 4,
> -  OBJECTS_RTEMS_PARTITIONS     = 5,
> -  OBJECTS_RTEMS_REGIONS        = 6,
> -  OBJECTS_RTEMS_PORTS          = 7,
> -  OBJECTS_RTEMS_PERIODS        = 8,
> -  OBJECTS_RTEMS_EXTENSIONS     = 9,
> -  OBJECTS_RTEMS_BARRIERS       = 10
> +  OBJECTS_CLASSIC_NO_CLASS = 0,
> +
> +  /* Must be one, see __Thread_Get_objects_information() */
> +  OBJECTS_RTEMS_TASKS = 1,
> +
> +  OBJECTS_RTEMS_TIMERS,
> +  OBJECTS_RTEMS_SEMAPHORES,
> +  OBJECTS_RTEMS_MESSAGE_QUEUES,
> +  OBJECTS_RTEMS_PARTITIONS,
> +  OBJECTS_RTEMS_REGIONS,
> +  OBJECTS_RTEMS_PORTS,
> +  OBJECTS_RTEMS_PERIODS,
> +  OBJECTS_RTEMS_EXTENSIONS,
> +  OBJECTS_RTEMS_BARRIERS
>  } Objects_Classic_API;
>
>  /**
> @@ -77,13 +82,16 @@ typedef enum {
>   *  for the POSIX API.
>   */
>  typedef enum {
> -  OBJECTS_POSIX_NO_CLASS            = 0,
> -  OBJECTS_POSIX_THREADS             = 1,
> -  OBJECTS_POSIX_KEYS                = 2,
> -  OBJECTS_POSIX_MESSAGE_QUEUES      = 5,
> -  OBJECTS_POSIX_SEMAPHORES          = 7,
> -  OBJECTS_POSIX_TIMERS              = 9,
> -  OBJECTS_POSIX_SHMS                = 12
> +  OBJECTS_POSIX_NO_CLASS = 0,
> +
> +  /* Must be one, see __Thread_Get_objects_information() */
> +  OBJECTS_POSIX_THREADS = 1,
> +
> +  OBJECTS_POSIX_KEYS,
> +  OBJECTS_POSIX_MESSAGE_QUEUES,
> +  OBJECTS_POSIX_SEMAPHORES,
> +  OBJECTS_POSIX_TIMERS,
> +  OBJECTS_POSIX_SHMS
>  } Objects_POSIX_API;
>
>  /**
> --
> 2.16.4
>
> _______________________________________________
> 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/20190522/fab41ab4/attachment-0002.html>


More information about the devel mailing list