/******************************************************************************* **+--------------------------------------------------------------------------+** **| **** |** **| **** |** **| ******o*** |** **| ********_///_**** |** **| ***** /_//_/ **** |** **| ** ** (__/ **** |** **| ********* |** **| **** |** **| *** |** **| |** **| Copyright (c) 1998-2005 Texas Instruments Incorporated |** **| ALL RIGHTS RESERVED |** **| |** **+--------------------------------------------------------------------------+** *******************************************************************************/ /** \file pal_osProtect_inline.h \brief OsPROTECT Services Source File \author PSP Architecture Team \version 1.0 */ #ifndef __PAL_OSPROTECT_INLINE_H__ #define __PAL_OSPROTECT_INLINE_H__ #include "pal_os.h" #include "pal_defs.h" #include "pal_osCfg.h" #include #include /** * \defgroup PalOSProtect PAL OS Protect Interface * * PAL OS Protect Interface * \{ */ /** \name PAL OS Protect Interface * PAL OS Protect Interface * \{ */ /** * \brief PAL OS Protect Entry */ PAL_INLINE void PAL_osProtectEntry(Int level, Uint32* cookie) { Uint flags; if(level == PAL_OSPROTECT_INTERRUPT) { local_irq_save(flags); *cookie = flags; } } /** * \brief PAL OS Protect Exit */ PAL_INLINE void PAL_osProtectExit(Int level, Uint32 cookie) { if(level == PAL_OSPROTECT_INTERRUPT) { local_irq_restore(cookie); } } /*\}*/ /*\}*/ #endif