📄 ssp_int.c
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -