Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/utest/mailbox_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,17 @@ static void test_dynamic_mailbox_send_recv(void)

static rt_err_t utest_tc_init(void)
{
/* This testcase may be run more than once in a single boot. The finish
* flags are set by the worker threads and read by the test body, so they
* must be cleared before every run. Otherwise the second run would skip
* the wait loop, detach/delete the mailbox while the worker threads are
* still blocked in rt_mb_recv(), and those threads would then use an
* already detached mailbox. */
static_mb_recv_thread_finish = 0;
static_mb_send_thread_finish = 0;
dynamic_mb_recv_thread_finish = 0;
dynamic_mb_send_thread_finish = 0;

return RT_EOK;
}

Expand Down
Loading