Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
vgsuppression.c
Go to the documentation of this file.
1/*
2 vgsuppression.c - Helper program to generate valgrind suppression files
3
4 Copyright (C)
5 2008, Christian Thaeter <ct@pipapo.org>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11*/
12
22/*
23 just place any problematic calls where valgrind whines about in main (with comments please)
24*/
25
26#include "lib/tmpbuf.h"
27#include <stdint.h>
28
29typedef const char* lumiera_err;
31
34
36lumiera_error_set (lumiera_err, const char*);
37
39lumiera_error (void);
40
41
42int
44{
45 /* debian etch glibc is lazy about cleaning up TLS */
48
49 /* tempbufs aren't freed by design */
50 lumiera_tmpbuf_snprintf (SIZE_MAX, "everyone loves c-strings");
51
52 /* lumiera_error_get() mallocs a LumieraErrorcontext for each thread */
54 lumiera_error_set("dummy","dummy");
56
57 return 0;
58}
Holding error and some context data.
Definition error-state.c:48
const char * lumiera_err
Definition error.h:48
char * lumiera_tmpbuf_snprintf(size_t size, const char *fmt,...)
Construct a string in a tmpbuf.
Definition tmpbuf.c:116
void lumiera_tmpbuf_freeall(void)
free all buffers associated with this thread.
Definition tmpbuf.c:64
void * lumiera_tmpbuf_provide(size_t size)
Query a thread local tmpbuf.
Definition tmpbuf.c:80
Round robin temporary buffers.
struct lumiera_errorcontext_struct * lumiera_error_get(void)
Definition error-state.c:74
lumiera_err lumiera_error(void)
Get and clear current error state.
const char * lumiera_err
lumiera_err lumiera_error_set(lumiera_err, const char *)
Set error state for the current thread.
Definition error-state.c:96
int main()