| 35 | long start_time = butil::cpuwide_time_ms(); |
| 36 | int c = 0; |
| 37 | void* locker(void* arg) { |
| 38 | bthread_mutex_t* m = (bthread_mutex_t*)arg; |
| 39 | bthread_mutex_lock(m); |
| 40 | printf("[%" PRIu64 "] I'm here, %d, %" PRId64 "ms\n", |
| 41 | pthread_numeric_id(), ++c, butil::cpuwide_time_ms() - start_time); |
| 42 | bthread_usleep(10000); |
| 43 | bthread_mutex_unlock(m); |
| 44 | return NULL; |
| 45 | } |
| 46 | |
| 47 | TEST(MutexTest, sanity) { |
| 48 | bthread_mutex_t m; |
nothing calls this directly
no test coverage detected