2
This file is part of drd, a data race detector.
4
Copyright (C) 2006-2007 Bart Van Assche
5
bart.vanassche@gmail.com
7
This program is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License as
9
published by the Free Software Foundation; either version 2 of the
10
License, or (at your option) any later version.
12
This program is distributed in the hope that it will be useful, but
13
WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22
The GNU General Public License is contained in the file COPYING.
26
// Condition variable state information: mutex specified in pthread_cond_wait()
34
#include "pub_tool_basics.h" // Addr, SizeT
36
#include "drd_thread.h" // DrdThreadId
41
Addr cond; // Pointer to client condition variable.
42
SizeT size; // sizeof(pthread_cond_t)
44
Addr mutex; // Client mutex specified in pthread_cond_wait() call, and null
45
// if no client threads are currently waiting on this cond.var.
48
void cond_set_trace(const Bool trace_cond);
49
void cond_init(const Addr cond, const SizeT size);
50
void cond_destroy(struct cond_info* const p);
51
struct cond_info* cond_get(Addr const mutex);
52
int cond_pre_wait(const Addr cond, const SizeT cond_size, const Addr mutex);
53
int cond_post_wait(const Addr cond);
54
void cond_pre_signal(Addr const cond);
55
void cond_pre_broadcast(Addr const cond);
56
void cond_stop_using_mem(const Addr a1, const Addr a2);