diff options
author | Colin Cross <ccross@android.com> | 2010-10-06 16:31:32 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-10-06 16:32:09 -0700 |
commit | 98959c85632cde43fc83ba1b709f767fc3b8a4ee (patch) | |
tree | be7912bc7cd8c2aab86922da933439ff951ab602 /include/linux/kernel_debugger.h | |
parent | 5c4a97667fdf6705d6c9f9e4b42dd7deb4da6978 (diff) | |
parent | df5ac72e83df9fd8d735d40d5be464d4b66d6074 (diff) |
Merge branch 'android-2.6.36' into android-tegra-2.6.36
Conflicts:
drivers/input/touchscreen/Kconfig
Change-Id: Ifc75266e258f9513d78c47c12e2f1de1d2344f02
Diffstat (limited to 'include/linux/kernel_debugger.h')
-rw-r--r-- | include/linux/kernel_debugger.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/kernel_debugger.h b/include/linux/kernel_debugger.h new file mode 100644 index 000000000000..b4dbfe99d79e --- /dev/null +++ b/include/linux/kernel_debugger.h @@ -0,0 +1,41 @@ +/* + * include/linux/kernel_debugger.h + * + * Copyright (C) 2008 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _LINUX_KERNEL_DEBUGGER_H_ +#define _LINUX_KERNEL_DEBUGGER_H_ + +struct kdbg_ctxt { + int (*printf)(void *cookie, const char *fmt, ...); + void *cookie; +}; + +/* kernel_debugger() is called from IRQ context and should + * use the kdbg_ctxt.printf to write output (do NOT call + * printk, do operations not safe from IRQ context, etc). + * + * kdbg_ctxt.printf will return -1 if there is not enough + * buffer space or if you are being aborted. In this case + * you must return as soon as possible. + * + * Return non-zero if more data is available -- if buffer + * space ran and you had to stop, but could print more, + * for example. + * + * Additional calls where cmd is "more" will be made if + * the additional data is desired. + */ +int kernel_debugger(struct kdbg_ctxt *ctxt, char *cmd); + +#endif |