*/
static void DRD_(set_joinable)(const pthread_t tid, const int joinable)
{
- int res;
+ int res __attribute__((unused));
assert(joinable == 0 || joinable == 1);
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__SET_JOINABLE,
tid, joinable, 0, 0, 0);
/** Tell DRD that the calling thread is about to enter pthread_create(). */
static __always_inline void DRD_(entering_pthread_create)(void)
{
- int res;
+ int res __attribute__((unused));
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__ENTERING_PTHREAD_CREATE,
0, 0, 0, 0, 0);
}
/** Tell DRD that the calling thread has left pthread_create(). */
static __always_inline void DRD_(left_pthread_create)(void)
{
- int res;
+ int res __attribute__((unused));
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__LEFT_PTHREAD_CREATE,
0, 0, 0, 0, 0);
}
*/
static void* DRD_(thread_wrapper)(void* arg)
{
- int res;
+ int res __attribute__((unused));
DrdPosixThreadArgs* arg_ptr;
DrdPosixThreadArgs arg_copy;
*/
static void DRD_(set_main_thread_state)(void)
{
- int res;
+ int res __attribute__((unused));
// Make sure that DRD knows about the main thread's POSIX thread ID.
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__SET_PTHREADID,
int pthread_create_intercept(pthread_t* thread, const pthread_attr_t* attr,
void* (*start)(void*), void* arg)
{
- int res;
+ int res __attribute__((unused));
int ret;
OrigFn fn;
DrdPosixThreadArgs thread_args;
int pthread_join_intercept(pthread_t pt_joinee, void **thread_return)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
static __always_inline
int pthread_cancel_intercept(pthread_t pt_thread)
{
- int res;
+ int res __attribute__((unused));
int ret;
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
const pthread_mutexattr_t* attr)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
int mt;
VALGRIND_GET_ORIG_FN(fn);
int pthread_mutex_destroy_intercept(pthread_mutex_t* mutex)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_MUTEX_DESTROY,
int pthread_mutex_lock_intercept(pthread_mutex_t* mutex)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__PRE_MUTEX_LOCK,
int pthread_mutex_trylock_intercept(pthread_mutex_t* mutex)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__PRE_MUTEX_LOCK,
const struct timespec *abs_timeout)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__PRE_MUTEX_LOCK,
int pthread_mutex_unlock_intercept(pthread_mutex_t *mutex)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1,
const pthread_condattr_t* attr)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_INIT,
int pthread_cond_destroy_intercept(pthread_cond_t* cond)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_DESTROY,
int pthread_cond_wait_intercept(pthread_cond_t *cond, pthread_mutex_t *mutex)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_WAIT,
const struct timespec* abstime)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_WAIT,
int pthread_cond_signal_intercept(pthread_cond_t* cond)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_SIGNAL,
int pthread_cond_broadcast_intercept(pthread_cond_t* cond)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_BROADCAST,
int pthread_spin_init_intercept(pthread_spinlock_t *spinlock, int pshared)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SPIN_INIT_OR_UNLOCK,
int pthread_spin_destroy_intercept(pthread_spinlock_t *spinlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_MUTEX_DESTROY,
int pthread_spin_lock_intercept(pthread_spinlock_t *spinlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__PRE_MUTEX_LOCK,
int pthread_spin_trylock_intercept(pthread_spinlock_t *spinlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__PRE_MUTEX_LOCK,
int pthread_spin_unlock_intercept(pthread_spinlock_t *spinlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SPIN_INIT_OR_UNLOCK,
unsigned count)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_BARRIER_INIT,
int pthread_barrier_destroy_intercept(pthread_barrier_t* barrier)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_BARRIER_DESTROY,
int pthread_barrier_wait_intercept(pthread_barrier_t* barrier)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_BARRIER_WAIT,
int sem_init_intercept(sem_t *sem, int pshared, unsigned int value)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_INIT,
int sem_destroy_intercept(sem_t *sem)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_DESTROY,
unsigned int value)
{
sem_t *ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_OPEN,
static __always_inline int sem_close_intercept(sem_t *sem)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_CLOSE,
static __always_inline int sem_wait_intercept(sem_t *sem)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_WAIT,
static __always_inline int sem_trywait_intercept(sem_t *sem)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_WAIT,
int sem_timedwait_intercept(sem_t *sem, const struct timespec *abs_timeout)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_WAIT,
static __always_inline int sem_post_intercept(sem_t *sem)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_POST,
const pthread_rwlockattr_t* attr)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_RWLOCK_INIT,
int pthread_rwlock_destroy_intercept(pthread_rwlock_t* rwlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
CALL_FN_W_W(ret, fn, rwlock);
int pthread_rwlock_rdlock_intercept(pthread_rwlock_t* rwlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_RWLOCK_RDLOCK,
int pthread_rwlock_wrlock_intercept(pthread_rwlock_t* rwlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_RWLOCK_WRLOCK,
int pthread_rwlock_timedrdlock_intercept(pthread_rwlock_t* rwlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_RWLOCK_RDLOCK,
int pthread_rwlock_timedwrlock_intercept(pthread_rwlock_t* rwlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_RWLOCK_WRLOCK,
int pthread_rwlock_tryrdlock_intercept(pthread_rwlock_t* rwlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_RWLOCK_RDLOCK,
int pthread_rwlock_trywrlock_intercept(pthread_rwlock_t* rwlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_RWLOCK_WRLOCK,
int pthread_rwlock_unlock_intercept(pthread_rwlock_t* rwlock)
{
int ret;
- int res;
+ int res __attribute__((unused));
OrigFn fn;
VALGRIND_GET_ORIG_FN(fn);
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_RWLOCK_UNLOCK,