summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorShell <[email protected]>2023-11-02 20:23:11 +0800
committerGitHub <[email protected]>2023-11-02 20:23:11 +0800
commitc2036e769ae5a16931e40f834cc0687342dc89ce (patch)
tree4cd769b538d956d7ca9114318cc5beb403c43df6 /examples
parent1b6f0e88a309251de7ccaa21bf5e078c8d9eb8ed (diff)
[smart] fixup of lwp recycling and mm varea (#8206)
Signed-off-by: shell <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r--examples/utest/testcases/mm/mm_lwp_tc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/utest/testcases/mm/mm_lwp_tc.c b/examples/utest/testcases/mm/mm_lwp_tc.c
index 76fc0c8c92..6f9bb112bf 100644
--- a/examples/utest/testcases/mm/mm_lwp_tc.c
+++ b/examples/utest/testcases/mm/mm_lwp_tc.c
@@ -67,7 +67,7 @@ static void test_user_map_varea(void)
uassert_true(varea->start != 0);
uassert_true(varea->start >= (void *)USER_VADDR_START && varea->start < (void *)USER_VADDR_TOP);
- uassert_true(!lwp_ref_dec(lwp));
+ uassert_true(!(lwp_ref_dec(lwp) - 1));
}
static void test_user_map_varea_ext(void)
@@ -91,7 +91,7 @@ static void test_user_map_varea_ext(void)
uassert_true(varea->start != 0);
uassert_true(varea->start >= (void *)USER_VADDR_START && varea->start < (void *)USER_VADDR_TOP);
- uassert_true(!lwp_ref_dec(lwp));
+ uassert_true(!(lwp_ref_dec(lwp) - 1));
}
static void user_map_varea_tc(void)