summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzhkag <[email protected]>2023-06-10 12:32:34 +0800
committerGitHub <[email protected]>2023-06-10 12:32:34 +0800
commit0f998f6b05e044d2c2a0c99f24f4cd97f263f478 (patch)
tree8211353b2dfe888d9a1c8f5355cc415bdad5c37c /src
parentd0c6d6f4a48b67fde477c743bec1a68198e882f3 (diff)
[simulator] 模拟器可以使用 utest 测试框架 (#7644)
Co-authored-by: Man, Jianting (Meco) <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/kservice.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kservice.c b/src/kservice.c
index 4f44183707..dddcdf6df3 100644
--- a/src/kservice.c
+++ b/src/kservice.c
@@ -1574,8 +1574,13 @@ rt_inline void _heap_unlock(rt_base_t level)
#ifdef RT_USING_UTESTCASES
/* export to utest to observe the inner statements */
+#ifdef _MSC_VER
+#define rt_heap_lock() _heap_lock()
+#define rt_heap_unlock() _heap_unlock()
+#else
rt_base_t rt_heap_lock(void) __attribute__((alias("_heap_lock")));
void rt_heap_unlock(rt_base_t level) __attribute__((alias("_heap_unlock")));
+#endif /* _MSC_VER */
#endif
#if defined(RT_USING_SMALL_MEM_AS_HEAP)