| 19786 | static atomic_int g_thread_done = 0; |
| 19787 | |
| 19788 | static void *try_lock_thread(void *arg) { |
| 19789 | (void)arg; |
| 19790 | if (cbm_pipeline_try_lock()) { |
| 19791 | atomic_store(&g_thread_acquired, 1); |
| 19792 | cbm_pipeline_unlock(); |
| 19793 | } else { |
| 19794 | atomic_store(&g_thread_acquired, 0); |
| 19795 | } |
| 19796 | atomic_store(&g_thread_done, 1); |
| 19797 | return NULL; |
| 19798 | } |
| 19799 | |
| 19800 | TEST(pipeline_lock_contention) { |
| 19801 | /* Main thread holds lock, spawned thread should fail try_lock */ |
nothing calls this directly
no test coverage detected