ftmemsim-valgrind/exp-drd/drd_clientreq.h
Julian Seward 994193f9bb Regtest/stability changes for drd (Bart Van Assche)
- Fix helgrind/tests/tc18_semabuse.c on glibc 2.7 (RedHat 8).

- Fixed a glibc 2.7 specific assertion failure in exp-drd, namely one
  that was triggered when sem_post()'s return value is not zero.

- exp-drd/test/matinv.c compiles now also on RedHat 7.3.

Note: more work will be required to get exp-drd working correctly on
RedHat 7.3.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7354
2008-01-18 07:42:01 +00:00

128 lines
4.5 KiB
C

#ifndef __DRD_CLIENTREQ_H
#define __DRD_CLIENTREQ_H
#include "valgrind.h" // VG_USERREQ_TOOL_BASE()
enum {
/* Ask the core the thread ID assigned by Valgrind. */
VG_USERREQ__GET_THREAD_SELF = VG_USERREQ_TOOL_BASE('D', 'R'),
/* args: none. */
/* Set the name of the thread that performs this client request. */
VG_USERREQ__SET_THREAD_NAME,
/* args: null-terminated character string. */
/* To tell the drd tool to suppress data race detection on the specified */
/* address range. */
VG_USERREQ__DRD_START_SUPPRESSION,
/* args: start address, size in bytes */
/* To tell the drd tool no longer to suppress data race detection on the */
/* specified address range. */
VG_USERREQ__DRD_FINISH_SUPPRESSION,
/* args: start address, size in bytes */
/* Ask drd to suppress data race reports on all currently allocated stack */
/* data of the current thread. */
VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK,
/* args: none */
/* To ask the drd tool to start a new segment in the specified thread. */
VG_USERREQ__DRD_START_NEW_SEGMENT,
/* args: POSIX thread ID. */
/* To tell the drd tool to start again recording memory accesses for the */
/* specified thread. */
VG_USERREQ__DRD_START_RECORDING,
/* args: POSIX thread ID. */
/* To tell the drd tool to stop recording memory accesses for the */
/* specified thread. */
VG_USERREQ__DRD_STOP_RECORDING,
/* args: POSIX thread ID. */
/* Tell the core the pthread_t of the running thread */
VG_USERREQ__SET_PTHREADID,
/* args: pthread_t. */
/* Ask the core that a the thread's state transition from */
/* VgTs_Zombie to VgTs_Empty is delayed until */
/* VG_USERREQ__POST_THREAD_JOIN is performed. */
VG_USERREQ__SET_JOINABLE,
/* args: pthread_t, Bool */
/* To notify drd that a thread finished because */
/* pthread_thread_join() was called on it. */
VG_USERREQ__POST_THREAD_JOIN,
/* args: pthread_t (joinee) */
/* to notify the drd tool of a pthread_mutex_init call. */
VG_USERREQ__PRE_MUTEX_INIT,
/* args: Addr, MutexT */
/* to notify the drd tool of a pthread_mutex_destroy call. */
VG_USERREQ__POST_MUTEX_DESTROY,
/* args: Addr, SizeT, MutexT */
/* to notify the drd tool of pthread_mutex_lock calls */
VG_USERREQ__PRE_PTHREAD_MUTEX_LOCK,
/* args: Addr, SizeT, MutexT */
/* to notify the drd tool of pthread_mutex_lock calls */
VG_USERREQ__POST_PTHREAD_MUTEX_LOCK,
/* args: Addr, SizeT, MutexT */
/* to notify the drd tool of pthread_mutex_unlock calls */
VG_USERREQ__PRE_PTHREAD_MUTEX_UNLOCK,
/* args: Addr */
VG_USERREQ__SPIN_INIT_OR_UNLOCK,
/* args: Addr spinlock, SizeT size */
/* to notify the drd tool of a pthread_cond_init call. */
VG_USERREQ__POST_PTHREAD_COND_INIT,
/* args: Addr */
/* to notify the drd tool of a pthread_cond_destroy call. */
VG_USERREQ__PRE_PTHREAD_COND_DESTROY,
/* args: Addr cond, SizeT cond_size, Addr mutex, SizeT mutex_size */
VG_USERREQ__PRE_PTHREAD_COND_WAIT,
/* args: Addr cond, SizeT cond_size, Addr mutex, SizeT mutex_size */
VG_USERREQ__POST_PTHREAD_COND_WAIT,
/* args: Addr cond, SizeT cond_size, Addr mutex, SizeT mutex_size */
VG_USERREQ__PRE_PTHREAD_COND_SIGNAL,
/* args: Addr cond */
VG_USERREQ__PRE_PTHREAD_COND_BROADCAST,
/* args: Addr cond */
/* To notify the drd tool of a sem_init call. */
VG_USERREQ__SEM_INIT,
/* args: Addr sem, SizeT sem_size, Word pshared, Word value */
/* To notify the drd tool of a sem_destroy call. */
VG_USERREQ__SEM_DESTROY,
/* args: Addr sem */
/* To notify the drd tool of a sem_wait call. */
VG_USERREQ__POST_SEM_WAIT,
/* args: Addr sem, SizeT sem_size */
/* To notify the drd tool before a sem_post call. */
VG_USERREQ__PRE_SEM_POST,
/* args: Addr sem, SizeT sem_size */
/* To notify the drd tool after a sem_post call. */
VG_USERREQ__POST_SEM_POST,
/* args: Addr sem, SizeT sem_size, Bool waited */
/* To notify the drd tool of a pthread_barrier_init call. */
VG_USERREQ__BARRIER_INIT,
/* args: Addr barrier, SizeT barrier_size, Word count */
/* To notify the drd tool of a pthread_barrier_destroy call. */
VG_USERREQ__BARRIER_DESTROY,
/* args: Addr barrier */
/* To notify the drd tool of a pthread_barrier_wait call. */
VG_USERREQ__PRE_BARRIER_WAIT,
/* args: Addr barrier */
/* To notify the drd tool of a pthread_barrier_wait call. */
VG_USERREQ__POST_BARRIER_WAIT,
/* args: Addr barrier, Word has_waited */
};
typedef enum
{
mutex_type_mutex = 1,
mutex_type_spinlock = 2,
} MutexT;
#endif // __DRD_CLIENTREQ_H