blob: 292ea89584a627678b111a1f9e2c01d63a03a61b [file] [log] [blame]
njn984a6362005-06-11 01:07:00 +00001
2/*--------------------------------------------------------------------*/
3/*--- Thread modelling. pub_core_threadmodel.h ---*/
4/*--------------------------------------------------------------------*/
5
6/*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
9
10 Copyright (C) 2005 Jeremy Fitzhardinge
11 jeremy@goop.org
12
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
26 02111-1307, USA.
27
28 The GNU General Public License is contained in the file COPYING.
29*/
30
31#ifndef __PUB_CORE_THREADMODEL_H
32#define __PUB_CORE_THREADMODEL_H
33
34//--------------------------------------------------------------------
35// PURPOSE: This module does thread modelling stuff...
36//--------------------------------------------------------------------
37
38//extern void VG_(tm_thread_create) (ThreadId creator, ThreadId tid, Bool detached);
39//extern void VG_(tm_thread_exit) (ThreadId tid);
40//extern Bool VG_(tm_thread_exists) (ThreadId tid);
41//extern void VG_(tm_thread_detach) (ThreadId tid);
42//extern void VG_(tm_thread_join) (ThreadId joiner, ThreadId joinee);
43//extern void VG_(tm_thread_switchto)(ThreadId tid);
44//
45//extern void VG_(tm_mutex_init) (ThreadId tid, Addr mutexp);
46//extern void VG_(tm_mutex_destroy)(ThreadId tid, Addr mutexp);
47//extern void VG_(tm_mutex_trylock)(ThreadId tid, Addr mutexp);
48//extern void VG_(tm_mutex_giveup) (ThreadId tid, Addr mutexp);
49//extern void VG_(tm_mutex_acquire)(ThreadId tid, Addr mutexp);
50//extern void VG_(tm_mutex_tryunlock)(ThreadId tid, Addr mutexp);
51//extern void VG_(tm_mutex_unlock) (ThreadId tid, Addr mutexp);
52//extern Bool VG_(tm_mutex_exists) (Addr mutexp);
53//
54//extern UInt VG_(tm_error_update_extra) (Error *err);
55//extern Bool VG_(tm_error_equal) (VgRes res, Error *e1, Error *e2);
56//extern void VG_(tm_error_print) (Error *err);
57//
58//extern void VG_(tm_init) ();
59//
60//extern void VG_(tm_cond_init) (ThreadId tid, Addr condp);
61//extern void VG_(tm_cond_destroy) (ThreadId tid, Addr condp);
62//extern void VG_(tm_cond_wait) (ThreadId tid, Addr condp, Addr mutexp);
63//extern void VG_(tm_cond_wakeup) (ThreadId tid, Addr condp, Addr mutexp);
64//extern void VG_(tm_cond_signal) (ThreadId tid, Addr condp);
65
66#endif // __PUB_CORE_THREADMODEL_H
67
68/*--------------------------------------------------------------------*/
69/*--- end ---*/
70/*--------------------------------------------------------------------*/