ssp_int.c

来自「abstract rtos」· C语言 代码 · 共 109 行

C
109
字号
#include "syscfg.h"#ifdef __cplusplusextern "C"{#endif #include "sys/sys_pub.h"#include "aos.h"#if CONFIG_OS_WINDOWSCRITICAL_SECTION m_GlbLock;#elif  CONFIG_OS_VXWORKS#else#error "please config os"#endifU32 m_int_init( ){#if  CONFIG_OS_WINDOWS    InitializeCriticalSection( &m_GlbLock );#elif CONFIG_OS_VXWORKS#else#error "please config os"#endif        return AOS_SUCC;}U32 aos_int_lock(){    U32 lockKey;    #if CONFIG_OS_WINDOWS    EnterCriticalSection( &m_GlbLock );    lockKey = 0;#elif CONFIG_OS_VXWORKS    lockKey = (U32)intLock();     #else#error "please config os"#endif    return lockKey;}VOID aos_int_unlock( U32 lockKey ){#if CONFIG_OS_WINDOWS    LeaveCriticalSection ( &m_GlbLock );#elif CONFIG_OS_VXWORKS     intUnlock( lockKey );    #else#error "please config os"#endif    (void)lockKey;}U32 aos_int_count(){    #if CONFIG_OS_WINDOWS    return 0;#elif CONFIG_OS_VXWORKS    return (U32)intCount();     #else#error "please config os"#endif}#ifdef __cplusplus}#endif 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?