[PATCH] score: Fix internal error number status
Joel Sherrill
joel at rtems.org
Tue Apr 6 13:53:57 UTC 2021
Fix doesn't say what was wrong. Please have a message which indicates what
was wrong and why it needs to be changed.
On Tue, Apr 6, 2021, 8:43 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
> ---
> cpukit/include/rtems/score/status.h | 4 ++--
> cpukit/rtems/src/taskconstruct.c | 22 ++++++++++++++++++++++
> 2 files changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/cpukit/include/rtems/score/status.h
> b/cpukit/include/rtems/score/status.h
> index 352f76e34d..a1c3c84b4d 100644
> --- a/cpukit/include/rtems/score/status.h
> +++ b/cpukit/include/rtems/score/status.h
> @@ -50,7 +50,7 @@ extern "C" {
> */
> typedef enum {
> STATUS_CLASSIC_INCORRECT_STATE = 14,
> - STATUS_CLASSIC_INTERNAL_ERROR = 13,
> + STATUS_CLASSIC_INTERNAL_ERROR = 25,
> STATUS_CLASSIC_INVALID_NUMBER = 10,
> STATUS_CLASSIC_INVALID_PRIORITY = 19,
> STATUS_CLASSIC_INVALID_SIZE = 8,
> @@ -107,7 +107,7 @@ typedef enum {
> STATUS_INVALID_PRIORITY =
> STATUS_BUILD( STATUS_CLASSIC_INVALID_PRIORITY, EINVAL ),
> STATUS_MAXIMUM_COUNT_EXCEEDED =
> - STATUS_BUILD( STATUS_CLASSIC_INTERNAL_ERROR, EOVERFLOW ),
> + STATUS_BUILD( STATUS_CLASSIC_UNSATISFIED, EOVERFLOW ),
> STATUS_MESSAGE_INVALID_SIZE =
> STATUS_BUILD( STATUS_CLASSIC_INVALID_SIZE, EMSGSIZE ),
> STATUS_MESSAGE_QUEUE_INVALID_NUMBER =
> diff --git a/cpukit/rtems/src/taskconstruct.c
> b/cpukit/rtems/src/taskconstruct.c
> index 397f6c2c89..2cddb448f6 100644
> --- a/cpukit/rtems/src/taskconstruct.c
> +++ b/cpukit/rtems/src/taskconstruct.c
> @@ -35,6 +35,28 @@
>
> #include <string.h>
>
> +#define STATUS_ASSERT( status ) \
> + RTEMS_STATIC_ASSERT( \
> + (int) STATUS_CLASSIC_##status == (int) RTEMS_##status, \
> + status \
> + )
> +
> +STATUS_ASSERT( INCORRECT_STATE );
> +STATUS_ASSERT( INTERNAL_ERROR );
> +STATUS_ASSERT( INVALID_NUMBER );
> +STATUS_ASSERT( INVALID_PRIORITY );
> +STATUS_ASSERT( INVALID_SIZE );
> +STATUS_ASSERT( NO_MEMORY );
> +STATUS_ASSERT( NOT_DEFINED );
> +STATUS_ASSERT( NOT_OWNER_OF_RESOURCE );
> +STATUS_ASSERT( OBJECT_WAS_DELETED );
> +STATUS_ASSERT( PROXY_BLOCKING );
> +STATUS_ASSERT( RESOURCE_IN_USE );
> +STATUS_ASSERT( SUCCESSFUL );
> +STATUS_ASSERT( TIMEOUT );
> +STATUS_ASSERT( TOO_MANY );
> +STATUS_ASSERT( UNSATISFIED );
> +
> static rtems_status_code _RTEMS_tasks_Prepare_user_stack(
> Thread_Configuration *thread_config,
> const rtems_task_config *config
> --
> 2.26.2
>
> _______________________________________________
> 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/20210406/2a337a51/attachment.html>
More information about the devel
mailing list