blob: f2ae496867b6881ba38f3c103430731bd41d858a [file] [log] [blame]
sewardj99a2ceb2007-11-09 12:30:36 +00001
2/*------------------------------------------------------------------------*/
3/*--- Definitions needing to be shared between source files. ---*/
4/*--- omega.h ---*/
5/*------------------------------------------------------------------------*/
6
7/*
8 This file is part of Omega, a Valgrind tool for instantly detecting
9 memory leaks.
10
sewardj4d474d02008-02-11 11:34:59 +000011 Copyright (C) 2006-2008 Bryan "Brain Murders" Meredith
sewardj99a2ceb2007-11-09 12:30:36 +000012
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.
sewardj5b8ab5b2007-11-30 21:52:27 +000029
30 The current maintainer is Rich Coe <richard.coe@med.ge.com>.
sewardj99a2ceb2007-11-09 12:30:36 +000031*/
32
33#ifndef __omega_h
34#define __omega_h
35
36#include "valgrind.h"
37
38/*
39** Setup client request calls so we can track entering and leaving main().
40*/
41typedef
42enum {
43 VG_USERREQ__ENTERING_MAIN = VG_USERREQ_TOOL_BASE('O','M'),
44 VG_USERREQ__LEAVING_MAIN
45} Vg_OmegaClientRequest;
46
47#define VALGRIND_DO_ENTER_MAIN \
48 {unsigned int _qzz_res; \
49 VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
50 VG_USERREQ__ENTERING_MAIN, \
51 0, 0, 0, 0, 0); \
52 }
53
54#define VALGRIND_DO_LEAVE_MAIN \
55 {unsigned int _qzz_res; \
56 VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \
57 VG_USERREQ__LEAVING_MAIN, \
58 0, 0, 0, 0, 0); \
59 }
60
61#endif