From ac7d5ef06a6d6e8d84abbd1f0b82162725f98326 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 11 May 1995 17:39:37 +0000 Subject: Initial revision --- cpukit/score/macros/rtems/score/states.inl | 201 +++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 cpukit/score/macros/rtems/score/states.inl (limited to 'cpukit/score/macros/rtems/score/states.inl') diff --git a/cpukit/score/macros/rtems/score/states.inl b/cpukit/score/macros/rtems/score/states.inl new file mode 100644 index 0000000000..f69c4ba042 --- /dev/null +++ b/cpukit/score/macros/rtems/score/states.inl @@ -0,0 +1,201 @@ +/* states.inl + * + * This file contains the macro implementation of the inlined + * routines associated with RTEMS state information. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __STATES_inl +#define __STATES_inl + +/*PAGE + * + * _States_Set + * + */ + +#define _States_Set( _states_to_set, _current_state ) \ + ((_current_state) | (_states_to_set)) + +/*PAGE + * + * _States_Clear + * + */ + +#define _States_Clear( _states_to_clear, _current_state ) \ + ((_current_state) & ~(_states_to_clear)) + +/*PAGE + * + * _States_Is_ready + * + */ + +#define _States_Is_ready( _the_states ) \ + ( (_the_states) == STATES_READY ) + +/*PAGE + * + * _States_Is_only_dormant + * + */ + +#define _States_Is_only_dormant( _the_states ) \ + ( (_the_states) == STATES_DORMANT ) + +/*PAGE + * + * _States_Is_dormant + * + */ + +#define _States_Is_dormant( _the_states ) \ + ( (_the_states) & STATES_DORMANT ) + +/*PAGE + * + * _States_Is_suspended + * + */ + +#define _States_Is_suspended( _the_states ) \ + ( (_the_states) & STATES_SUSPENDED ) + +/*PAGE + * + * _States_Is_Transient + * + */ + +#define _States_Is_transient( _the_states ) \ + ( (_the_states) & STATES_TRANSIENT ) + +/*PAGE + * + * _States_Is_delaying + * + */ + +#define _States_Is_delaying( _the_states ) \ + ( (_the_states) & STATES_DELAYING ) + +/*PAGE + * + * _States_Is_waiting_for_buffer + * + */ + +#define _States_Is_waiting_for_buffer( _the_states ) \ + ( (_the_states) & STATES_WAITING_FOR_BUFFER ) + +/*PAGE + * + * _States_Is_waiting_for_segment + * + */ + +#define _States_Is_waiting_for_segment( _the_states ) \ + ( (_the_states) & STATES_WAITING_FOR_SEGMENT ) + +/*PAGE + * + * _States_Is_waiting_for_message + * + */ + +#define _States_Is_waiting_for_message( _the_states ) \ + ( (_the_states) & STATES_WAITING_FOR_MESSAGE ) + +/*PAGE + * + * _States_Is_waiting_for_event + * + */ + +#define _States_Is_waiting_for_event( _the_states ) \ + ( (_the_states) & STATES_WAITING_FOR_EVENT ) + +/*PAGE + * + * _States_Is_waiting_for_semaphore + * + */ + +#define _States_Is_waiting_for_semaphore( _the_states ) \ + ( (_the_states) & STATES_WAITING_FOR_SEMAPHORE ) + +/*PAGE + * + * _States_Is_waiting_for_time + * + */ + +#define _States_Is_waiting_for_time( _the_states ) \ + ( (_the_states) & STATES_WAITING_FOR_TIME ) + +/*PAGE + * + * _States_Is_waiting_for_rpc_reply + * + */ + +#define _States_Is_waiting_for_rpc_reply( _the_states ) \ + ( (_the_states) & STATES_WAITING_FOR_RPC_REPLY ) + +/*PAGE + * + * _States_Is_waiting_for_period + * + */ + +#define _States_Is_waiting_for_period( _the_states ) \ + ( (_the_states) & STATES_WAITING_FOR_PERIOD ) + +/*PAGE + * + * _States_Is_locally_blocked + * + */ + +#define _States_Is_locally_blocked( _the_states ) \ + ( (_the_states) & STATES_LOCALLY_BLOCKED ) + +/*PAGE + * + * _States_Is_waiting_on_thread_queue + * + */ + +#define _States_Is_waiting_on_thread_queue( _the_states ) \ + ( (_the_states) & STATES_WAITING_ON_THREAD_QUEUE ) + +/*PAGE + * + * _States_Is_blocked + * + */ + +#define _States_Is_blocked( _the_states ) \ + ( (_the_states) & STATES_BLOCKED ) + +/*PAGE + * + * _States_Are_set + * + */ + +#define _States_Are_set( _the_states, _mask ) \ + ( ((_the_states) & (_mask)) != STATES_READY ) + +#endif +/* end of include file */ -- cgit v1.2.3