]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/dde/include/ddekit/printf.h
update
[l4.git] / l4 / pkg / dde / include / ddekit / printf.h
1 /*
2  * This file is part of DDEKit.
3  *
4  * (c) 2006-2010 Bjoern Doebel <doebel@os.inf.tu-dresden.de>
5  *               Christian Helmuth <ch12@os.inf.tu-dresden.de>
6  *               Thomas Friebel <tf13@os.inf.tu-dresden.de>
7  *     economic rights: Technische Universitaet Dresden (Germany)
8  *
9  * This file is part of TUD:OS and distributed under the terms of the
10  * GNU General Public License 2.
11  * Please see the COPYING-GPL-2 file for details.
12  */
13
14 #pragma once
15
16 #include <l4/sys/compiler.h>
17 #include <stdarg.h>
18
19 EXTERN_C_BEGIN
20
21 /** Print message.
22  * \ingroup DDEKit_util
23  */
24 void ddekit_print(const char *);
25
26 /** Print message with format.
27  * \ingroup DDEKit_util
28  */
29 void ddekit_printf(const char *fmt, ...);
30
31 /** Print message with format list.
32  * \ingroup DDEKit_util
33  */
34 void ddekit_vprintf(const char *fmt, va_list va);
35
36 /** Log function and message.
37  * \ingroup DDEKit_util
38  */
39 #define ddekit_log(doit, msg...) \
40         do {                                       \
41                 if (doit) {                            \
42                         ddekit_printf("%s(): ", __func__); \
43                         ddekit_printf(msg);                \
44                         ddekit_printf("\n");               \
45                 }                                      \
46         } while(0);
47
48 EXTERN_C_END