diff options
Diffstat (limited to 'c/src/exec/rtems/macros/tasks.inl')
-rw-r--r-- | c/src/exec/rtems/macros/tasks.inl | 57 |
1 files changed, 10 insertions, 47 deletions
diff --git a/c/src/exec/rtems/macros/tasks.inl b/c/src/exec/rtems/macros/tasks.inl index 243d0addc7..8dd6ff351b 100644 --- a/c/src/exec/rtems/macros/tasks.inl +++ b/c/src/exec/rtems/macros/tasks.inl @@ -17,11 +17,6 @@ #ifndef __RTEMS_TASKS_inl #define __RTEMS_TASKS_inl -#include <rtems/msgmp.h> -#include <rtems/partmp.h> -#include <rtems/regionmp.h> -#include <rtems/semmp.h> - /*PAGE * * _RTEMS_tasks_Allocate @@ -42,54 +37,22 @@ /*PAGE * - * _RTEMS_tasks_Cancel_wait - * + * _RTEMS_tasks_Priority_to_Core */ - -#define _RTEMS_tasks_Cancel_wait( _the_thread ) \ - { \ - States_Control _state; \ - States_Control _remote_state; \ - \ - _state = (_the_thread)->current_state; \ - \ - if ( _States_Is_waiting_on_thread_queue( _state ) ) { \ - if ( _States_Is_waiting_for_rpc_reply( _state ) && \ - _States_Is_locally_blocked( _state ) ) { \ - _remote_state = _States_Clear( \ - STATES_WAITING_FOR_RPC_REPLY + STATES_TRANSIENT, \ - _state \ - ); \ - \ - switch ( _remote_state ) { \ - \ - case STATES_WAITING_FOR_BUFFER: \ - _Partition_MP_Send_extract_proxy( (_the_thread) ); \ - break; \ - case STATES_WAITING_FOR_SEGMENT: \ - _Region_MP_Send_extract_proxy( (_the_thread) ); \ - break; \ - case STATES_WAITING_FOR_SEMAPHORE: \ - _Semaphore_MP_Send_extract_proxy( (_the_thread) ); \ - break; \ - case STATES_WAITING_FOR_MESSAGE: \ - _Message_queue_MP_Send_extract_proxy( (_the_thread) ); \ - break; \ - } \ - } \ - _Thread_queue_Extract( (_the_thread)->Wait.queue, (_the_thread) ); \ - } \ - else if ( _Watchdog_Is_active( &(_the_thread)->Timer ) ) \ - (void) _Watchdog_Remove( &(_the_thread)->Timer ); \ - } + +#define _RTEMS_tasks_Priority_to_Core( _priority ) \ + ((Priority_Control) (_priority)) /*PAGE * - * _RTEMS_Tasks_Priority_to_Core + * _RTEMS_tasks_Priority_is_valid + * */ -#define _RTEMS_Tasks_Priority_to_Core( _priority ) \ - ((Priority_Control) (_priority)) +#define _RTEMS_tasks_Priority_is_valid( _the_priority ) \ + ( ((_the_priority) >= RTEMS_MINIMUM_PRIORITY) && \ + ((_the_priority) <= RTEMS_MAXIMUM_PRIORITY) ) + #endif /* end of include file */ |