| 90 | } |
| 91 | |
| 92 | av_cold void ff_pthread_free(void *obj, const unsigned offsets[]) |
| 93 | { |
| 94 | unsigned cnt = *(unsigned*)((char*)obj + offsets[0]); |
| 95 | const unsigned *cur_offset = offsets; |
| 96 | |
| 97 | *(unsigned*)((char*)obj + offsets[0]) = 0; |
| 98 | |
| 99 | for (; *(++cur_offset) != THREAD_SENTINEL && cnt; cnt--) |
| 100 | pthread_mutex_destroy((pthread_mutex_t*)((char*)obj + *cur_offset)); |
| 101 | for (; *(++cur_offset) != THREAD_SENTINEL && cnt; cnt--) |
| 102 | pthread_cond_destroy ((pthread_cond_t *)((char*)obj + *cur_offset)); |
| 103 | } |
| 104 | |
| 105 | av_cold int ff_pthread_init(void *obj, const unsigned offsets[]) |
| 106 | { |
no test coverage detected