ptos/amd64+ke: Add bugcheck support
Signed-off-by: Chloe M <chloe@mensia.org>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2026, Chloe M.
|
||||
* Provided under the BSD-3 clause.
|
||||
*
|
||||
* Description: Bugcheck interface
|
||||
* Author: Chloe M.
|
||||
*/
|
||||
|
||||
#ifndef _KE_BUGCHECK_H_
|
||||
#define _KE_BUGCHECK_H_ 1
|
||||
|
||||
#include <ptdef.h>
|
||||
|
||||
/*
|
||||
* A list of reasons to why a bug check can happen
|
||||
*
|
||||
* @BUGCHECK_MISC: Misc reason
|
||||
* @BUGCHECK_OOM: Out of memory during critical operation
|
||||
* @BUGCHECK_IO_ERROR: Fatal I/O error
|
||||
* @BUGCHECK_UNBOUND_RESRC: Fatal unbound resource
|
||||
* @BUGCHECK_EXCEPTION: Fatal exception
|
||||
*/
|
||||
typedef enum {
|
||||
BUGCHECK_MISC,
|
||||
BUGCHECK_OOM,
|
||||
BUGCHECK_IO_ERROR,
|
||||
BUGCHECK_UNBOUND_RESRC,
|
||||
BUGCHECK_EXCEPTION
|
||||
} BUGCHECK_REASON;
|
||||
|
||||
/*
|
||||
* Signal to the user that something has gone terribly wrong
|
||||
* during system operation and that the machine needs to come to
|
||||
* a screetching halt.
|
||||
*
|
||||
* @Reason: Broad reason of bugcheck
|
||||
* @Fmt: Format specifier
|
||||
* @<...>: Variadic arguments
|
||||
*/
|
||||
NO_RETURN VOID KeBugCheck(BUGCHECK_REASON Reason, const CHAR *Fmt, ...);
|
||||
|
||||
#endif /* !_KE_BUGCHECK_H_ */
|
||||
Reference in New Issue
Block a user