同步:新增mutex trace.

Close:#I5ZMNK

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
This commit is contained in:
zhangdengyu
2022-11-07 17:39:19 +08:00
parent 02aaa768dc
commit 07f7213885
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