L4Re - L4 Runtime Environment
log.h
Go to the documentation of this file.
1 
5 /*
6  * (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
7  * economic rights: Technische Universit├Ąt 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  * As a special exception, you may use this file as part of a free software
14  * library without restriction. Specifically, if other files instantiate
15  * templates or use macros or inline functions from this file, or you compile
16  * this file and link it with other files to produce an executable, this
17  * file does not by itself cause the resulting executable to be covered by
18  * the GNU General Public License. This exception does not however
19  * invalidate any other reasons why the executable file might be covered by
20  * the GNU General Public License.
21  */
22 #pragma once
23 
30 #include <l4/re/env.h>
31 
33 
44 L4_CV L4_INLINE void
45 l4re_log_print(char const *string) L4_NOTHROW;
46 
58 L4_CV L4_INLINE void
59 l4re_log_printn(char const *string, int len) L4_NOTHROW;
60 
61 
62 
63 
75 L4_CV void
76 l4re_log_print_srv(const l4_cap_idx_t logcap,
77  char const *string) L4_NOTHROW;
78 
91 L4_CV void
93  char const *string, int len) L4_NOTHROW;
94 
95 
96 /********** Implementations ***************************/
97 
98 L4_CV L4_INLINE void
99 l4re_log_print(char const *string) L4_NOTHROW
100 {
101  l4re_log_print_srv(l4re_global_env->log, string);
102 }
103 
104 L4_CV L4_INLINE void
105 l4re_log_printn(char const *string, int len) L4_NOTHROW
106 {
107  l4re_log_printn_srv(l4re_global_env->log, string, len);
108 }
109 
void l4re_log_print_srv(const l4_cap_idx_t logcap, char const *string) L4_NOTHROW
Write a null terminated string to a log.
#define EXTERN_C_END
End section with C types and functions.
Definition: compiler.h:187
void l4re_log_printn_srv(const l4_cap_idx_t logcap, char const *string, int len) L4_NOTHROW
Write a string of a given length to a log.
unsigned long l4_cap_idx_t
L4 Capability selector Type.
Definition: types.h:342
Environment interface.
void l4re_log_print(char const *string) L4_NOTHROW
Write a null terminated string to the default log.
Definition: log.h:99
void l4re_log_printn(char const *string, int len) L4_NOTHROW
Write a string of a given length to the default log.
Definition: log.h:105
#define EXTERN_C_BEGIN
Start section with C types and functions.
Definition: compiler.h:186
#define L4_CV
Define calling convention.
Definition: linkage.h:44
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition: compiler.h:185
l4_cap_idx_t log
Logging object-capability.
Definition: env.h:110