/** @file     OsTask_MS.c
  *
  * @brief    Task OsTask_MS body
  *
  * @note     AUTOMATICALLY GENERATED FILE! DO NOT EDIT!
  *
  * @note     Generated by ETAS RTA-RTE
  * @note     Version 6.5.0 
  *
  * @date     Thu Mar  7 11:39:19 2019
  */

#define RTE_CORE

#include "Rte_Const.h"
#if !defined(RTE_VENDOR_MODE)
#pragma message "Compiling an individual task file but RTE_VENDOR_MODE not defined. Compiling a stale file?"
#endif /* !defined(RTE_VENDOR_MODE) */
#if defined(RTE_USE_TASK_HEADER)
#include "OsTask_MS.h"
#else /* !defined(RTE_USE_TASK_HEADER) */
#include "Os.h"
#endif /* !defined(RTE_USE_TASK_HEADER) */
#if defined(RTE_REQUIRES_IOC)
#include "Ioc.h"
#endif /* defined(RTE_REQUIRES_IOC) */
#include "Rte.h"
#include "Rte_Intl.h"
#include "Rte_Type.h"
#include "Rte_DataHandleType.h"

#define RTE_START_SEC_VAR_INIT_8
#include "Rte_MemMap.h" /*lint !e537 permit multiple inclusion */
extern VAR(uint8, RTE_DATA) Rte_ModeCurrent_5;

extern VAR(uint8, RTE_DATA) Rte_ModeNext_5;

#define RTE_STOP_SEC_VAR_INIT_8
#include "Rte_MemMap.h" /*lint !e537 permit multiple inclusion */

/* Runnable entity prototypes */
#define BswM_START_SEC_CODE
#include "BswM_MemMap.h" /*lint !e537 permit multiple inclusion */
FUNC(void, BswM_CODE) BswM_Cfg_DfrdSwcNotification_BswM_MRP_SwcModeRequest_SHUT_DOWN(void);
#define BswM_STOP_SEC_CODE
#include "BswM_MemMap.h" /*lint !e537 permit multiple inclusion */

#define RTE_START_SEC_CODE
#include "Rte_MemMap.h" /*lint !e537 permit multiple inclusion */
TASK(OsTask_MS)
{
   uint8 Rte_ShadowModeNext_5;

   /* Box: Implicit Buffer Initialization begin */
   /* Box: Implicit Buffer Initialization end */
   /* Box: EnterSynchronizationBox begin */
   /* SpecReq: Enter OS Exclusive Area begin */
   Rte_SuspendOSInterrupts();
   /* SpecReq: Enter OS Exclusive Area end */
   /* Box: EnterSynchronizationBox end */
   /* Box: Rte_ModeShadowCopyBlock_5 begin */
   /* Box: Rte_ModeNext_5 begin */
   Rte_ShadowModeNext_5 = Rte_ModeNext_5;
   /* Box: Rte_ModeNext_5 end */
   /* Box: Rte_ModeOld_5 begin */
   /* Box: Rte_ModeOld_5 end */
   /* Box: Rte_ModeSchMNext_5 begin */
   /* Box: Rte_ModeSchMNext_5 end */
   /* Box: Rte_ModeSchMOld_5 begin */
   /* Box: Rte_ModeSchMOld_5 end */
   /* Box: Rte_ModeShadowCopyBlock_5 end */
   /* Box: ExitSynchronizationBox begin */
   /* SpecReq: Exit OS Exclusive Area begin */
   Rte_ResumeOSInterrupts();
   /* SpecReq: Exit OS Exclusive Area end */
   /* Box: ExitSynchronizationBox end */
   /* Box: Implicit Buffer Fill begin */
   /* Box: Implicit Buffer Fill end */
   /* Box: CPT_BswM begin */
   if ( Rte_ShadowModeNext_5 == 0 )
   {
      BswM_Cfg_DfrdSwcNotification_BswM_MRP_SwcModeRequest_SHUT_DOWN();
   }
   /* Box: CPT_BswM end */
   /* Box: Rte_ModeInstance_5 begin */
   if ( Rte_ShadowModeNext_5 != 2 )
   {
      /* set new mdd */
      {
         /* SpecReq: Enter OS Exclusive Area begin */
         Rte_SuspendOSInterrupts();
         /* SpecReq: Enter OS Exclusive Area end */
         Rte_ModeCurrent_5 = Rte_ShadowModeNext_5;
         Rte_ModeNext_5 = 2;
         /* SpecReq: Exit OS Exclusive Area begin */
         Rte_ResumeOSInterrupts();
         /* SpecReq: Exit OS Exclusive Area end */
         /* SpecReq: MSA invoke begin */
         /* SpecReq: MSA invoke end */
      }
   }
   /* Box: Rte_ModeInstance_5 end */
   /* Box: Implicit Buffer Flush begin */
   /* Box: Implicit Buffer Flush end */
   TerminateTask();
} /* OsTask_MS */
#define RTE_STOP_SEC_CODE
#include "Rte_MemMap.h" /*lint !e537 permit multiple inclusion */

