- marks code path that should be unreachable (never executed)
- if hit, panics and reports the problem
- the end of main() marked as such. The SMP changes need some magic with stack
switching before the AP can be started as they need to run on the boot stack
before figuring out what is their own stack. As main() uses the boot stack to,
we need to switch to to the stack of BSP before executing the last part of
main() which needs to be in a separate function so we can jump to it.
Therefore restart() won't be the last call in main() which may be confusing.
The macro can/should be used in other such places too.
#define vmassert(t) { }
#endif
+#define NOT_REACHABLE(__x) do { \
+ kprintf("NOT_REACHABLE at %s:%d\n", __FILE__, __LINE__); \
+ minix_panic("execution at an unexpected location\n", NO_NUM); \
+ for(;;); \
+} while(0)
+
#endif /* DEBUG_H */
FIXME("PROC check enabled");
#endif
restart();
+ NOT_REACHABLE();
}
/*===========================================================================*