Lines Matching full:m

43 INTERCEPTOR(int, pthread_mutex_destroy, pthread_mutex_t *m) {  in INTERCEPTOR()  argument
45 MutexDestroy(thr, (uptr)m); in INTERCEPTOR()
46 return REAL(pthread_mutex_destroy)(m); in INTERCEPTOR()
49 INTERCEPTOR(int, pthread_mutex_lock, pthread_mutex_t *m) { in INTERCEPTOR() argument
51 MutexBeforeLock(thr, (uptr)m, true); in INTERCEPTOR()
52 int res = REAL(pthread_mutex_lock)(m); in INTERCEPTOR()
53 MutexAfterLock(thr, (uptr)m, true, false); in INTERCEPTOR()
57 INTERCEPTOR(int, pthread_mutex_trylock, pthread_mutex_t *m) { in INTERCEPTOR() argument
59 int res = REAL(pthread_mutex_trylock)(m); in INTERCEPTOR()
61 MutexAfterLock(thr, (uptr)m, true, true); in INTERCEPTOR()
65 INTERCEPTOR(int, pthread_mutex_unlock, pthread_mutex_t *m) { in INTERCEPTOR() argument
67 MutexBeforeUnlock(thr, (uptr)m, true); in INTERCEPTOR()
68 return REAL(pthread_mutex_unlock)(m); in INTERCEPTOR()
71 INTERCEPTOR(int, pthread_spin_destroy, pthread_spinlock_t *m) { in INTERCEPTOR() argument
73 int res = REAL(pthread_spin_destroy)(m); in INTERCEPTOR()
74 MutexDestroy(thr, (uptr)m); in INTERCEPTOR()
78 INTERCEPTOR(int, pthread_spin_lock, pthread_spinlock_t *m) { in INTERCEPTOR() argument
80 MutexBeforeLock(thr, (uptr)m, true); in INTERCEPTOR()
81 int res = REAL(pthread_spin_lock)(m); in INTERCEPTOR()
82 MutexAfterLock(thr, (uptr)m, true, false); in INTERCEPTOR()
86 INTERCEPTOR(int, pthread_spin_trylock, pthread_spinlock_t *m) { in INTERCEPTOR() argument
88 int res = REAL(pthread_spin_trylock)(m); in INTERCEPTOR()
90 MutexAfterLock(thr, (uptr)m, true, true); in INTERCEPTOR()
94 INTERCEPTOR(int, pthread_spin_unlock, pthread_spinlock_t *m) { in INTERCEPTOR() argument
96 MutexBeforeUnlock(thr, (uptr)m, true); in INTERCEPTOR()
97 return REAL(pthread_spin_unlock)(m); in INTERCEPTOR()
100 INTERCEPTOR(int, pthread_rwlock_destroy, pthread_rwlock_t *m) { in INTERCEPTOR() argument
102 MutexDestroy(thr, (uptr)m); in INTERCEPTOR()
103 return REAL(pthread_rwlock_destroy)(m); in INTERCEPTOR()
106 INTERCEPTOR(int, pthread_rwlock_rdlock, pthread_rwlock_t *m) { in INTERCEPTOR() argument
108 MutexBeforeLock(thr, (uptr)m, false); in INTERCEPTOR()
109 int res = REAL(pthread_rwlock_rdlock)(m); in INTERCEPTOR()
110 MutexAfterLock(thr, (uptr)m, false, false); in INTERCEPTOR()
114 INTERCEPTOR(int, pthread_rwlock_tryrdlock, pthread_rwlock_t *m) { in INTERCEPTOR() argument
116 int res = REAL(pthread_rwlock_tryrdlock)(m); in INTERCEPTOR()
118 MutexAfterLock(thr, (uptr)m, false, true); in INTERCEPTOR()
122 INTERCEPTOR(int, pthread_rwlock_timedrdlock, pthread_rwlock_t *m, in INTERCEPTOR() argument
125 int res = REAL(pthread_rwlock_timedrdlock)(m, abstime); in INTERCEPTOR()
127 MutexAfterLock(thr, (uptr)m, false, true); in INTERCEPTOR()
131 INTERCEPTOR(int, pthread_rwlock_wrlock, pthread_rwlock_t *m) { in INTERCEPTOR() argument
133 MutexBeforeLock(thr, (uptr)m, true); in INTERCEPTOR()
134 int res = REAL(pthread_rwlock_wrlock)(m); in INTERCEPTOR()
135 MutexAfterLock(thr, (uptr)m, true, false); in INTERCEPTOR()
139 INTERCEPTOR(int, pthread_rwlock_trywrlock, pthread_rwlock_t *m) { in INTERCEPTOR() argument
141 int res = REAL(pthread_rwlock_trywrlock)(m); in INTERCEPTOR()
143 MutexAfterLock(thr, (uptr)m, true, true); in INTERCEPTOR()
147 INTERCEPTOR(int, pthread_rwlock_timedwrlock, pthread_rwlock_t *m, in INTERCEPTOR() argument
150 int res = REAL(pthread_rwlock_timedwrlock)(m, abstime); in INTERCEPTOR()
152 MutexAfterLock(thr, (uptr)m, true, true); in INTERCEPTOR()
156 INTERCEPTOR(int, pthread_rwlock_unlock, pthread_rwlock_t *m) { in INTERCEPTOR() argument
158 MutexBeforeUnlock(thr, (uptr)m, true); // note: not necessary write unlock in INTERCEPTOR()
159 return REAL(pthread_rwlock_unlock)(m); in INTERCEPTOR()
183 INTERCEPTOR(int, pthread_cond_wait, pthread_cond_t *c, pthread_mutex_t *m) { in INTERCEPTOR() argument
186 MutexBeforeUnlock(thr, (uptr)m, true); in INTERCEPTOR()
187 MutexBeforeLock(thr, (uptr)m, true); in INTERCEPTOR()
188 int res = REAL(pthread_cond_wait)(cond, m); in INTERCEPTOR()
189 MutexAfterLock(thr, (uptr)m, true, false); in INTERCEPTOR()
193 INTERCEPTOR(int, pthread_cond_timedwait, pthread_cond_t *c, pthread_mutex_t *m, in INTERCEPTOR() argument
197 MutexBeforeUnlock(thr, (uptr)m, true); in INTERCEPTOR()
198 MutexBeforeLock(thr, (uptr)m, true); in INTERCEPTOR()
199 int res = REAL(pthread_cond_timedwait)(cond, m, abstime); in INTERCEPTOR()
200 MutexAfterLock(thr, (uptr)m, true, false); in INTERCEPTOR()
242 void __dsan_before_mutex_lock(uptr m, int writelock) { in __dsan_before_mutex_lock() argument
245 MutexBeforeLock(thr, m, writelock); in __dsan_before_mutex_lock()
248 void __dsan_after_mutex_lock(uptr m, int writelock, int trylock) { in __dsan_after_mutex_lock() argument
251 MutexAfterLock(thr, m, writelock, trylock); in __dsan_after_mutex_lock()
254 void __dsan_before_mutex_unlock(uptr m, int writelock) { in __dsan_before_mutex_unlock() argument
257 MutexBeforeUnlock(thr, m, writelock); in __dsan_before_mutex_unlock()
260 void __dsan_mutex_destroy(uptr m) { in __dsan_mutex_destroy() argument
263 // if (m >= g_data_start && m < g_data_end) in __dsan_mutex_destroy()
265 MutexDestroy(thr, m); in __dsan_mutex_destroy()