blob: d718c6f2291a8cd23ea76221065b259145dfd5ac [file] [log] [blame]
sewardj85642922008-01-14 11:54:56 +00001/*
2 This file is part of drd, a data race detector.
3
4 Copyright (C) 2006-2008 Bart Van Assche
5 bart.vanassche@gmail.com
6
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.
11
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.
16
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
20 02111-1307, USA.
21
22 The GNU General Public License is contained in the file COPYING.
23*/
24
25
sewardjaf44c822007-11-25 14:01:38 +000026void drd_post_thread_join(DrdThreadId joiner, DrdThreadId joinee);
sewardj85642922008-01-14 11:54:56 +000027
bart0268dfa2008-03-11 20:10:21 +000028void drd_pre_mutex_init(Addr mutex, const MutexT mutex_type);
sewardj721ad7b2007-11-30 08:30:29 +000029void drd_post_mutex_destroy(Addr mutex, const MutexT mutex_type);
bart2e3a3c12008-03-24 08:33:47 +000030void drd_pre_mutex_lock(const Addr mutex, const MutexT mutex_type,
31 const Bool trylock);
bart00344642008-03-01 15:27:41 +000032void drd_post_mutex_lock(Addr mutex, const Bool took_lock);
33void drd_pre_mutex_unlock(const Addr mutex, const MutexT mutex_type);
sewardj85642922008-01-14 11:54:56 +000034
bart0268dfa2008-03-11 20:10:21 +000035void drd_pre_cond_init(Addr cond);
bart72b751c2008-03-01 13:44:24 +000036void drd_post_cond_destroy(Addr cond);
sewardj85642922008-01-14 11:54:56 +000037
bart0268dfa2008-03-11 20:10:21 +000038void drd_semaphore_init(const Addr semaphore,
sewardj85642922008-01-14 11:54:56 +000039 const Word pshared, const Word value);
40void drd_semaphore_destroy(const Addr semaphore);
bart0268dfa2008-03-11 20:10:21 +000041void drd_semaphore_pre_wait(const DrdThreadId tid, const Addr semaphore);
sewardj85642922008-01-14 11:54:56 +000042void drd_semaphore_post_wait(const DrdThreadId tid, const Addr semaphore,
bart28230a32008-02-29 17:27:03 +000043 const Bool waited);
bart0268dfa2008-03-11 20:10:21 +000044void drd_semaphore_pre_post(const DrdThreadId tid, const Addr semaphore);
sewardj85642922008-01-14 11:54:56 +000045void drd_semaphore_post_post(const DrdThreadId tid, const Addr semaphore,
bart0268dfa2008-03-11 20:10:21 +000046 const Bool waited);
sewardj85642922008-01-14 11:54:56 +000047
bart0268dfa2008-03-11 20:10:21 +000048void drd_barrier_init(const Addr barrier,
49 const BarrierT barrier_type, const Word count,
50 const Bool reinitialization);
51void drd_barrier_destroy(const Addr barrier, const BarrierT barrier_type);
52void drd_barrier_pre_wait(const DrdThreadId tid, const Addr barrier,
53 const BarrierT barrier_type);
sewardj85642922008-01-14 11:54:56 +000054void drd_barrier_post_wait(const DrdThreadId tid, const Addr barrier,
bart0268dfa2008-03-11 20:10:21 +000055 const BarrierT barrier_type, const Bool waited);