55 #include <semaphore.h> 108 #define pthread_cond_timedwait_REAL DLV 109 #define pthread_cond_wait_REAL DLV 110 #define pthread_cond_broadcast_REAL DLV 111 #define pthread_cond_signal_REAL DLV 113 #define pthread_mutex_lock_REAL ALT 114 #define pthread_mutex_unlock_REAL ALT 115 #define pthread_mutex_timedlock_REAL DL 116 #define pthread_mutex_trylock_REAL ALT 118 #define pthread_spin_lock_REAL DL 119 #define pthread_spin_unlock_REAL DL 125 #define sched_yield_REAL DL 126 #define sem_wait_REAL DL 127 #define sem_post_REAL DL 128 #define sem_timedwait_REAL DL 134 REAL_TYPEDEF(
int, pthread_cond_timedwait)(pthread_cond_t* restrict cond,
135 pthread_mutex_t* restrict mutex,
136 const struct timespec* restrict abstime);
138 pthread_mutex_t* restrict mutex);
145 const struct timespec* restrict abs_timeout);
161 OVERRIDE_NM(pthread_cond_timedwait)(pthread_cond_t* restrict cond,
162 pthread_mutex_t* restrict mutex,
163 const struct timespec* restrict abstime)
168 int retval =
REAL_FN(pthread_cond_timedwait)(cond, mutex, abstime);
176 pthread_mutex_t* restrict mutex)
212 TMSG(LOCKWAIT,
"mutex lock ENCOUNTERED");
217 TMSG(LOCKWAIT,
"pthread mutex LOCK override");
230 TMSG(LOCKWAIT,
"mutex unlock ENCOUNTERED");
234 TMSG(LOCKWAIT,
"pthread mutex UNLOCK");
242 const struct timespec* restrict abs_timeout)
246 TMSG(LOCKWAIT,
"mutex timedlock ENCOUNTERED");
251 TMSG(LOCKWAIT,
"pthread mutex TIMEDLOCK");
264 TMSG(LOCKWAIT,
"pthread_spin_lock ENCOUNTERED");
269 TMSG(LOCKWAIT,
"pthread SPIN LOCK override");
282 TMSG(LOCKWAIT,
"pthread_spin_unlock ENCOUNTERED");
287 TMSG(LOCKWAIT,
"pthread SPIN UNLOCK");
304 hpcrun_abort(
"dlsym(RTLD_NEXT, %s) failed: %s", fname, e);
317 void* rv = dlvsym(
RTLD_NEXT, fname,
"GLIBC_2.3.2");
320 hpcrun_abort(
"dlsym(RTLD_NEXT, %s) failed: %s", fname, e);
345 int retval =
REAL_FN(sched_yield)();
368 TMSG(TBB_EACH,
"sem wait hit, sem = %p", sem);
370 int retval =
REAL_FN(sem_wait)(sem);
383 TMSG(LOCKWAIT,
"sem_post ENCOUNTERED");
387 TMSG(LOCKWAIT,
"sem POST");
400 TMSG(TBB_EACH,
"sem timedwait hit, sem = %p", sem);
int OVERRIDE_NM() pthread_cond_broadcast(pthread_cond_t *cond)
static unsigned int calls_to_sched_yield
void * override_lookup(char *fname)
void pthread_directed_blame_shift_spin_start(void *obj)
void * override_lookupv(char *fname)
#define hpcrun_abort(...)
void pthread_directed_blame_accept(void *obj)
int OVERRIDE_NM() sem_post(sem_t *sem)
void pthread_directed_blame_shift_end(void)
bool pthread_blame_lockwait_enabled(void)
int OVERRIDE_NM() pthread_spin_lock(pthread_spinlock_t *lock)
static unsigned int calls_to_sem_wait
int OVERRIDE_NM() pthread_mutex_timedlock(pthread_mutex_t *restrict mutex, const struct timespec *restrict abs_timeout)
int OVERRIDE_NM() pthread_spin_unlock(pthread_spinlock_t *lock)
int OVERRIDE_NM() pthread_cond_wait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex)
void pthread_directed_blame_shift_blocked_start(void *obj)
REAL_TYPEDEF(REAL_TYPEDEF(int, pthread_cond_timedwait)
int OVERRIDE_NM() pthread_mutex_lock(pthread_mutex_t *mutex)
int OVERRIDE_NM() pthread_cond_signal(pthread_cond_t *cond)
void monitor_real_abort(void)
int OVERRIDE_NM() sem_timedwait(sem_t *sem, const struct timespec *abs_timeout)
int OVERRIDE_NM() pthread_mutex_unlock(pthread_mutex_t *mutex)