create test */
| 368 | |
| 369 | /* create test */ |
| 370 | static void test_dynamic_mutex_create(void) |
| 371 | { |
| 372 | rt_err_t result = -RT_ERROR; |
| 373 | |
| 374 | /* PRIO mode */ |
| 375 | dynamic_mutex = rt_mutex_create("dynamic_mutex", RT_IPC_FLAG_PRIO); |
| 376 | if (RT_NULL == dynamic_mutex) |
| 377 | { |
| 378 | uassert_true(RT_FALSE); |
| 379 | } |
| 380 | |
| 381 | result = rt_mutex_delete(dynamic_mutex); |
| 382 | if (RT_EOK != result) |
| 383 | { |
| 384 | uassert_true(RT_FALSE); |
| 385 | } |
| 386 | |
| 387 | /* FIFO mode */ |
| 388 | dynamic_mutex = rt_mutex_create("dynamic_mutex", RT_IPC_FLAG_PRIO); |
| 389 | if (RT_NULL == dynamic_mutex) |
| 390 | { |
| 391 | uassert_true(RT_FALSE); |
| 392 | } |
| 393 | |
| 394 | result = rt_mutex_delete(dynamic_mutex); |
| 395 | if (RT_EOK != result) |
| 396 | { |
| 397 | uassert_true(RT_FALSE); |
| 398 | } |
| 399 | |
| 400 | uassert_true(RT_TRUE); |
| 401 | } |
| 402 | |
| 403 | /* dynamic take test */ |
| 404 | static void dynamic_mutex_take_entry(void *param) |
nothing calls this directly
no test coverage detected