[PATCH] score: Add and use PRIORITY_PSEUDO_ISR
Gedare Bloom
gedare at rtems.org
Thu Mar 5 14:19:45 UTC 2015
OK. On a related note, I don't like this "MINIMUM" and "MAXIMUM"
terminology I'd prefer HIGHEST and LOWEST, are we stuck with MINIMUM
and MAXIMUM for API compatibility?
On Thu, Mar 5, 2015 at 2:33 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> ---
> cpukit/rtems/src/timerserver.c | 2 +-
> cpukit/score/include/rtems/score/priority.h | 7 +++++++
> cpukit/score/src/mpci.c | 2 +-
> 3 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/cpukit/rtems/src/timerserver.c b/cpukit/rtems/src/timerserver.c
> index ad32172..e4fe56f 100644
> --- a/cpukit/rtems/src/timerserver.c
> +++ b/cpukit/rtems/src/timerserver.c
> @@ -481,7 +481,7 @@ rtems_status_code rtems_timer_initiate_server(
> if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
> if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
> return RTEMS_INVALID_PRIORITY;
> - _priority = 0;
> + _priority = PRIORITY_PSEUDO_ISR;
> }
>
> /*
> diff --git a/cpukit/score/include/rtems/score/priority.h b/cpukit/score/include/rtems/score/priority.h
> index f10f731..0a772f6 100644
> --- a/cpukit/score/include/rtems/score/priority.h
> +++ b/cpukit/score/include/rtems/score/priority.h
> @@ -58,6 +58,13 @@ typedef uint32_t Priority_Control;
> /** This defines the highest (most important) thread priority. */
> #define PRIORITY_MINIMUM 0
>
> +/**
> + * @brief This defines the priority of pseudo-ISR threads.
> + *
> + * Examples are the MPCI and timer server threads.
> + */
> +#define PRIORITY_PSEUDO_ISR PRIORITY_MINIMUM
> +
> /** This defines the default lowest (least important) thread priority. */
> #if defined (CPU_PRIORITY_MAXIMUM)
> #define PRIORITY_DEFAULT_MAXIMUM CPU_PRIORITY_MAXIMUM
> diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
> index e8a8ba2..a2acf89 100644
> --- a/cpukit/score/src/mpci.c
> +++ b/cpukit/score/src/mpci.c
> @@ -112,7 +112,7 @@ void _MPCI_Create_server( void )
> CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK +
> _Configuration_MP_table->extra_mpci_receive_server_stack,
> CPU_ALL_TASKS_ARE_FP,
> - PRIORITY_MINIMUM,
> + PRIORITY_PSEUDO_ISR,
> false, /* no preempt */
> THREAD_CPU_BUDGET_ALGORITHM_NONE,
> NULL, /* no budget algorithm callout */
> --
> 1.8.4.5
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list