remove stale readme.txt
[nobug.git] / tests / vgsuppression.c
blobcad44d7d50631d52e68b30db372706b69ddb5679
1 /*
2 vgsuppression.c - Helper program to generate valgrind suppression files
4 Copyright (C) pipapo.org
5 2009, Christian Thaeter <ct@pipapo.org>
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,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU 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., 675 Mass Ave, Cambridge, MA 02139, USA.
23 just place any problematic calls where valgrind whines about in main (with comments please)
26 #include "nobug.h"
27 #include <unistd.h>
29 #ifdef HAVE_PTHREAD
30 #include <pthread.h>
32 void* thread(void* nul)
34 NOBUG_THREAD_ID_SET("testthread");
35 ECHO ("Threading enabled");
37 return nul;
39 #endif
41 int
42 main ()
44 NOBUG_INIT;
46 NOBUG_THREAD_ID_SET("vgsuppression");
47 ECHO ("valgrind suppression generator");
49 #ifdef HAVE_PTHREAD
50 pthread_t handle;
51 if (pthread_create (&handle, NULL, thread, NULL))
52 pthread_join (handle, NULL);
53 #endif
55 _exit (0);
56 return 0;