mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xen/bug: Complete outstanding TODO
Since this TODO was written, BUILD_BUG_ON() has been moved out of xen/lib.h into xen/macros.h, which has done all the hard work. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
5f7fd392d9
commit
ecabcd0d4e
1 file changed
+7
-9
@@ -20,7 +20,8 @@
|
||||
#define BUG_DEBUGGER_TRAP_FATAL(regs) 0
|
||||
#endif
|
||||
|
||||
#include <xen/lib.h>
|
||||
#include <xen/macros.h>
|
||||
#include <xen/types.h>
|
||||
|
||||
#ifndef BUG_FRAME_STRUCT
|
||||
|
||||
@@ -104,14 +105,11 @@ typedef void bug_fn_t(const struct cpu_user_regs *regs);
|
||||
|
||||
#ifndef run_in_exception_handler
|
||||
|
||||
/*
|
||||
* TODO: untangle header dependences, break BUILD_BUG_ON() out of xen/lib.h,
|
||||
* and use a real static inline here to get proper type checking of fn().
|
||||
*/
|
||||
#define run_in_exception_handler(fn) do { \
|
||||
(void)((fn) == (void (*)(struct cpu_user_regs *))NULL); \
|
||||
BUG_FRAME(BUGFRAME_run_fn, 0, fn, 0, NULL); \
|
||||
} while ( false )
|
||||
static void always_inline run_in_exception_handler(
|
||||
void (*fn)(struct cpu_user_regs *regs))
|
||||
{
|
||||
BUG_FRAME(BUGFRAME_run_fn, 0, fn, 0, NULL);
|
||||
}
|
||||
|
||||
#endif /* run_in_exception_handler */
|
||||
|
||||
|
||||