feat: 同步:新增mutex trace

方案描述:
1. 新增mutex trace

Close: I5ZMML

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
This commit is contained in:
zhangdengyu
2022-12-08 16:38:04 +08:00
parent da29e90bca
commit 2eb0da90fe
6 changed files with 82 additions and 5 deletions

View File

@@ -62,6 +62,13 @@ STATIC INLINE UINTPTR ArchMspGet(VOID)
__asm("mrs %0, msp" : "=r" (msp));
return msp;
}
STATIC INLINE UINTPTR ArchLRGet(VOID)
{
UINTPTR lr;
__asm("mov %0, lr" : "=r" (lr));
return lr;
}
#elif defined(__CLANG_ARM) || defined(__GNUC__)
STATIC INLINE UINTPTR ArchSpGet(VOID)
{
@@ -83,6 +90,13 @@ STATIC INLINE UINTPTR ArchMspGet(VOID)
__asm volatile("mrs %0, msp" : "=r" (msp));
return msp;
}
STATIC INLINE UINTPTR ArchLRGet(VOID)
{
UINTPTR lr;
__asm volatile("mov %0, lr" : "=r" (lr));
return lr;
}
#else
/* Other platforms to be improved */
#endif