blob: 57baee09189af3793766a9648c973ea66163b6c6 [file] [log] [blame]
sewardjaf44c822007-11-25 14:01:38 +00001#ifndef __DRD_CLIENTREQ_H
2#define __DRD_CLIENTREQ_H
3
4
5#include "valgrind.h" // VG_USERREQ_TOOL_BASE()
6
7
8enum {
9 /* Ask the core the thread ID assigned by Valgrind. */
10 VG_USERREQ__GET_THREAD_SELF = VG_USERREQ_TOOL_BASE('D', 'R'),
11 /* args: none. */
12 /* Set the name of the thread that performs this client request. */
13 VG_USERREQ__SET_THREAD_NAME,
14 /* args: null-terminated character string. */
15
16 /* To tell the drd tool to suppress data race detection on the specified */
17 /* address range. */
18 VG_USERREQ__DRD_START_SUPPRESSION,
19 /* args: start address, size in bytes */
20 /* To tell the drd tool no longer to suppress data race detection on the */
21 /* specified address range. */
22 VG_USERREQ__DRD_FINISH_SUPPRESSION,
23 /* args: start address, size in bytes */
24 /* Ask drd to suppress data race reports on all currently allocated stack */
25 /* data of the current thread. */
26 VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK,
27 /* args: none */
28 /* To ask the drd tool to start a new segment in the specified thread. */
29 VG_USERREQ__DRD_START_NEW_SEGMENT,
30 /* args: POSIX thread ID. */
31
32 /* To tell the drd tool to start again recording memory accesses for the */
33 /* specified thread. */
34 VG_USERREQ__DRD_START_RECORDING,
35 /* args: POSIX thread ID. */
36 /* To tell the drd tool to stop recording memory accesses for the */
37 /* specified thread. */
38 VG_USERREQ__DRD_STOP_RECORDING,
39 /* args: POSIX thread ID. */
40
41 /* Tell the core the pthread_t of the running thread */
42 VG_USERREQ__SET_PTHREADID,
43 /* args: pthread_t. */
44 /* Ask the core that a the thread's state transition from */
45 /* VgTs_Zombie to VgTs_Empty is delayed until */
46 /* VG_USERREQ__POST_THREAD_JOIN is performed. */
47 VG_USERREQ__SET_JOINABLE,
48 /* args: pthread_t, Bool */
49
50 /* To notify drd that a thread finished because */
51 /* pthread_thread_join() was called on it. */
52 VG_USERREQ__POST_THREAD_JOIN,
53 /* args: pthread_t (joinee) */
54
55 /* To notify the core of a pthread_mutex_init call */
56 VG_USERREQ__PRE_MUTEX_INIT,
57 /* args: Addr, SizeT */
58 /* To notify the core of a pthread_mutex_destroy call */
59 VG_USERREQ__POST_MUTEX_DESTROY,
60 /* args: Addr, SizeT */
61 /* To notify the core of pthread_mutex_lock calls */
62 VG_USERREQ__PRE_PTHREAD_MUTEX_LOCK,
63 /* args: Addr, SizeT */
64 /* To notify the core of pthread_mutex_lock calls */
65 VG_USERREQ__POST_PTHREAD_MUTEX_LOCK,
66 /* args: Addr, SizeT */
67 /* To notify the core of pthread_mutex_unlock calls */
68 VG_USERREQ__PRE_PTHREAD_MUTEX_UNLOCK,
69 /* args: Addr */
70 VG_USERREQ__SPIN_INIT_OR_UNLOCK,
71 /* args: Addr spinlock, SizeT size */
72
73
74 /* To notify the core of a pthread_cond_init call */
75 VG_USERREQ__POST_PTHREAD_COND_INIT,
76 /* args: Addr, SizeT */
77 /* To notify the core of a pthread_cond_destroy call */
78 VG_USERREQ__PRE_PTHREAD_COND_DESTROY,
79 /* args: Addr, SizeT */
80 VG_USERREQ__PRE_PTHREAD_COND_WAIT,
81 /* args: Addr cond, Addr mutex */
82 VG_USERREQ__POST_PTHREAD_COND_WAIT,
83 /* args: Addr cond, Addr mutex */
84 VG_USERREQ__PRE_PTHREAD_COND_SIGNAL,
85 /* args: Addr cond */
86 VG_USERREQ__PRE_PTHREAD_COND_BROADCAST,
87 /* args: Addr cond */
88
89};
90
91void drd_clientreq_init(void);
92
93
94#endif // __DRD_CLIENTREQ_H