L4Re - L4 Runtime Environment
__ktrace-impl.h
Go to the documentation of this file.
1 
6 /*
7  * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8  * Björn Döbel <doebel@os.inf.tu-dresden.de>,
9  * Torsten Frenzel <frenzel@os.inf.tu-dresden.de>
10  * economic rights: Technische Universität Dresden (Germany)
11  *
12  * This file is part of TUD:OS and distributed under the terms of the
13  * GNU General Public License 2.
14  * Please see the COPYING-GPL-2 file for details.
15  *
16  * As a special exception, you may use this file as part of a free software
17  * library without restriction. Specifically, if other files instantiate
18  * templates or use macros or inline functions from this file, or you compile
19  * this file and link it with other files to produce an executable, this
20  * file does not by itself cause the resulting executable to be covered by
21  * the GNU General Public License. This exception does not however
22  * invalidate any other reasons why the executable file might be covered by
23  * the GNU General Public License.
24  */
25 #pragma once
26 
27 #include <l4/sys/types.h>
28 #include <l4/sys/kdebug.h>
29 
30 /*****************************************************************************
31  *** Implementation
32  *****************************************************************************/
33 
34 L4_INLINE l4_tracebuffer_status_t *
36 {
37  return 0;
38  /* Not implemented */
39 }
40 
41 L4_INLINE l4_addr_t
43 {
44  return ~0UL;
45 }
46 
47 L4_INLINE l4_umword_t
48 fiasco_tbuf_log(const char *text)
49 {
50  enum { TBUF_LOG = 0x201 };
51  return l4_error(__kdebug_text(TBUF_LOG, text, __builtin_strlen(text)));
52 }
53 
54 L4_INLINE l4_umword_t
55 fiasco_tbuf_log_3val(const char *text, l4_umword_t v1, l4_umword_t v2,
56  l4_umword_t v3)
57 {
58  enum { TBUF_LOG_3VAL = 0x204 };
59  return l4_error(__kdebug_3_text(TBUF_LOG_3VAL, text,
60  __builtin_strlen(text), v1, v2, v3));
61 }
62 
63 L4_INLINE void
65 {
66  enum { TBUF_CLEAR = 0x202 };
67  __kdebug_op(TBUF_CLEAR);
68 }
69 
70 L4_INLINE void
72 {
73  enum { TBUF_DUMP = 0x203 };
74  __kdebug_op(TBUF_DUMP);
75 }
76 
77 L4_INLINE l4_umword_t
78 fiasco_tbuf_log_binary(const unsigned char *data)
79 {
80  enum { TBUF_LOG_BIN = 0x208 };
81  return l4_error(__kdebug_text(TBUF_LOG_BIN, (const char *)data, 24));
82 }
83 
l4_addr_t fiasco_tbuf_get_status_phys(void)
Return the physical address of the trace-buffer status struct.
Definition: __ktrace-impl.h:42
Common L4 ABI Data Types.
void fiasco_tbuf_clear(void)
Clear trace-buffer.
Definition: __ktrace-impl.h:64
void fiasco_tbuf_dump(void)
Dump trace-buffer to kernel console.
Definition: __ktrace-impl.h:71
l4_umword_t fiasco_tbuf_log_3val(const char *text, l4_umword_t v1, l4_umword_t v2, l4_umword_t v3)
Create new trace-buffer entry with describing <text> and three additional values. ...
Definition: __ktrace-impl.h:55
l4_tracebuffer_status_t * fiasco_tbuf_get_status(void)
Return trace-buffer status.
Definition: __ktrace-impl.h:35
l4_umword_t fiasco_tbuf_log(const char *text)
Create new trace-buffer entry with describing <text>.
Definition: __ktrace-impl.h:48
l4_umword_t fiasco_tbuf_log_binary(const unsigned char *data)
Create new trace-buffer entry with binary data.
Definition: __ktrace-impl.h:78
unsigned long l4_umword_t
Unsigned machine word.
Definition: l4int.h:52
Trace-buffer status.
Definition: ktrace.h:67
long l4_error(l4_msgtag_t tag) L4_NOTHROW
Return error code of a system call return message tag.
Definition: ipc.h:517
unsigned long l4_addr_t
Address type.
Definition: l4int.h:45