/***************************************************************************//*! * \file T1_KPIT.h * * \brief Application-specific macros to map hooks in the KPIT OS to T1 * * $Author: jialinli $ * * $Revision: 10 $ * * \copyright GLIWA GmbH embedded systems, Weilheim i.OB. All rights reserved *******************************************************************************/ #include "T1_AppInterface.h" #if ! defined T1_KPIT_H_ # define T1_KPIT_H_ (1) # if ! defined T1_ENABLE /* T1 disabled, disable Timing Hooks */ # define T1TH_ACT_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_FAILACT_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_PREEMPTION_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_RESUMPTION_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_START_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_STOP_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_ECC_RELEASE_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_ECC_RESUME_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_ECC_WAITNOWAIT_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_ECC_WAIT_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_CAT1_START_NOSUSP( schedId_, coreId_ ) ((void)0) # define T1TH_CAT1_STOP_NOSUSP( schedId_, coreId_ ) ((void)0) # define T1TH_CAT2_START_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_CAT2_STOP_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_IDLE_TASK( coreId_ ) ((void)0) /* -------------------------------------------------------------------------- */ # else /* T1 Enabled */ # define T1TH_ACT_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID; \ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceActivationPC( (coreId_), taskId ); \ } \ } \ while(0) # define T1TH_FAILACT_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID; \ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceEventPC( (coreId_), \ T1_ACTIVATION_FAILED, \ taskId ); \ } \ } \ while(0) # define T1TH_PREEMPTION_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_RESUMPTION_NOSUSP( Os_StaticTask_, coreId_ ) ((void)0) # define T1TH_START_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID; \ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceStartPC( (coreId_), taskId ); \ } \ } \ while(0) # define T1TH_STOP_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID; \ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceStopPC( (coreId_), taskId ); \ } \ } \ while(0) # if defined T1_WAIT_RESUME # define T1TH_ECC_RELEASE_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID;\ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceReleaseNoSuspPC( (coreId_), taskId ); \ } \ } \ while(0) # define T1TH_ECC_RESUME_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID;\ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceResumeNoSuspPC( (coreId_), taskId ); \ } \ } \ while(0) # define T1TH_ECC_WAITNOWAIT_NOSUSP( Os_StaticTask_, coreId_ ) \ ((void)0) # define T1TH_ECC_WAIT_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID;\ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceWaitNoSuspPC( (coreId_), taskId ); \ } \ } \ while(0) # else /* Used Start Stop model */ # define T1TH_ECC_RELEASE_NOSUSP( Os_StaticTask_, coreId_ ) \ T1TH_ACT_NOSUSP( (Os_StaticTask_), (coreId_) ) # define T1TH_ECC_RESUME_NOSUSP( Os_StaticTask_, coreId_ ) \ T1TH_START_NOSUSP( (Os_StaticTask_), (coreId_) ) # define T1TH_ECC_WAITNOWAIT_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID;\ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceStopStartNoActPC( (coreId_), \ taskId, \ taskId ); \ } \ } \ while(0) # define T1TH_ECC_WAIT_NOSUSP( Os_StaticTask_, coreId_ ) \ T1TH_STOP_NOSUSP( (Os_StaticTask_), (coreId_) ) # endif /* defined T1_WAIT_RESUME */ # define T1TH_CAT1_START_NOSUSP( schedId_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (schedId_); \ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceStartNoActPC( (coreId_), taskId ); \ } \ } \ while(0) # define T1TH_CAT1_STOP_NOSUSP( schedId_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (schedId_); \ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceStopPC( (coreId_), taskId ); \ } \ } \ while(0) # define T1TH_CAT2_START_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID; \ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceStartNoActPC( (coreId_), taskId ); \ } \ } \ while(0) # define T1TH_CAT2_STOP_NOSUSP( Os_StaticTask_, coreId_ ) \ do \ { \ T1_uint16Least_t const taskId = (Os_StaticTask_)->ddTaskID; \ if( T1_TRACE_TASK( taskId ) ) \ { \ T1_TraceStopPC( (coreId_), taskId ); \ } \ } \ while(0) # define T1TH_IDLE_TASK( coreId_ ) ((void)0) # endif /* ! defined T1_ENABLE */ #endif /* ! defined T1_KPIT_H_ */