init test */
| 30 | |
| 31 | /* init test */ |
| 32 | static void test_static_mutex_init(void) |
| 33 | { |
| 34 | rt_err_t result = -RT_ERROR; |
| 35 | |
| 36 | result = rt_mutex_init(&static_mutex, "static_mutex", RT_IPC_FLAG_PRIO); |
| 37 | if (RT_EOK != result) |
| 38 | { |
| 39 | uassert_true(RT_FALSE); |
| 40 | } |
| 41 | |
| 42 | result = rt_mutex_detach(&static_mutex); |
| 43 | if (RT_EOK != result) |
| 44 | { |
| 45 | uassert_true(RT_FALSE); |
| 46 | } |
| 47 | |
| 48 | result = rt_mutex_init(&static_mutex, "static_mutex", RT_IPC_FLAG_PRIO); |
| 49 | if (RT_EOK != result) |
| 50 | { |
| 51 | uassert_true(RT_FALSE); |
| 52 | } |
| 53 | |
| 54 | result = rt_mutex_detach(&static_mutex); |
| 55 | if (RT_EOK != result) |
| 56 | { |
| 57 | uassert_true(RT_FALSE); |
| 58 | } |
| 59 | |
| 60 | uassert_true(RT_TRUE); |
| 61 | } |
| 62 | |
| 63 | /* static take test */ |
| 64 | static void static_mutex_take_entry(void *param) |
nothing calls this directly
no test coverage detected