os-k/src/kaleid/kernel/ke/state.h

38 lines
1.1 KiB
C

//----------------------------------------------------------------------------//
// GNU GPL OS/K //
// //
// Authors: spectral` //
// NeoX //
// //
// Desc: Current kernel state //
//----------------------------------------------------------------------------//
#ifndef _KALKERN_KE_STATE_H
#define _KALKERN_KE_STATE_H
#ifndef _KALKERN_H
#include <kalkern.h>
#endif
// XXX improve this
enum kernel_states {
// a process is running in kernel mode
KSTATE_PROCESS,
// the kernel is not running a process
KSTATE_KERNEL,
// the kernel is panicking
KSTATE_PANIC,
// the kernel is booting
KSTATE_INIT,
};
extern uchar __kstate;
#define GetKernState() (__kstate)
#define SetKernState(x) (__kstate = (x))
#endif