Xenomai 3.3.2
Loading...
Searching...
No Matches
debug.h
1/*
2 * Copyright (C) 2010 Philippe Gerum <rpm@xenomai.org>.
3 *
4 * Xenomai is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
8 *
9 * Xenomai is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Xenomai; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 * 02111-1307, USA.
18 */
19
20#ifndef _KERNEL_COBALT_DEBUG_H
21#define _KERNEL_COBALT_DEBUG_H
22
23#include <cobalt/kernel/assert.h>
24
25struct xnthread;
26
27#ifdef CONFIG_XENO_OPT_DEBUG
28
29int xndebug_init(void);
30
31void xndebug_cleanup(void);
32
33void xndebug_shadow_init(struct xnthread *thread);
34
35extern struct xnvfile_directory cobalt_debug_vfroot;
36
37#else /* !XENO_OPT_DEBUG */
38
39static inline int xndebug_init(void)
40{
41 return 0;
42}
43
44static inline void xndebug_cleanup(void)
45{
46}
47
48static inline void xndebug_shadow_init(struct xnthread *thread)
49{
50}
51
52#endif /* !XENO_OPT_DEBUG */
53
54#ifdef CONFIG_XENO_OPT_DEBUG_TRACE_RELAX
55void xndebug_notify_relax(struct xnthread *thread,
56 int reason);
57void xndebug_trace_relax(int nr, unsigned long *backtrace,
58 int reason);
59#else
60static inline
61void xndebug_notify_relax(struct xnthread *thread, int reason)
62{
63}
64static inline
65void xndebug_trace_relax(int nr, unsigned long *backtrace,
66 int reason)
67{
68 /* Simply ignore. */
69}
70#endif
71
72#endif /* !_KERNEL_COBALT_DEBUG_H */