| 81 | }; |
| 82 | |
| 83 | void trylock_holder(void* arg) { |
| 84 | auto* ctx = reinterpret_cast<TryLockArgs*>(arg); |
| 85 | (void)ctx->mtx->Lock(); |
| 86 | ctx->holder_locked.store(1); |
| 87 | (void)sys_sleep(200); |
| 88 | (void)ctx->mtx->UnLock(); |
| 89 | ctx->holder_done.store(1); |
| 90 | sys_exit(0); |
| 91 | } |
| 92 | |
| 93 | void test_mutex_trylock(void* /*arg*/) { |
| 94 | klog::Info("=== Mutex TryLock Test ==="); |