X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86_64%2Finclude%2Farch.h;h=c2c622e56d3f66ab1cd1a8fd9ec3e472786c0e00;hb=5255c9f07cb2e0e43cf283e256c964eaa7970c8e;hp=c353089a53b9afea1b216d4f56817113a11be761;hpb=8405ea0115d6b242fb1fb5ad314de89974a8eaf8;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86_64/include/arch.h b/Kernel/arch/x86_64/include/arch.h index c353089a..c2c622e5 100644 --- a/Kernel/arch/x86_64/include/arch.h +++ b/Kernel/arch/x86_64/include/arch.h @@ -10,6 +10,11 @@ #define KERNEL_BASE 0xFFFFFFFF##80000000 #define BITS 64 +#define STACKED_LOCKS 2 // 0: No, 1: Per-CPU, 2: Per-Thread +#define LOCK_DISABLE_INTS 0 + +#define INVLPTR ((void*)0x0FFFFFFFFFFFFFFFULL) + //#define INT_MAX 0x7FFFFFFF //#define UINT_MAX 0xFFFFFFFF @@ -42,7 +47,7 @@ typedef char BOOL; /** * \brief Halt the CPU */ -#define HALT() __asm__ __volatile__ ("hlt") +#define HALT() __asm__ __volatile__ ("sti;\n\thlt") /** * \brief Fire a magic breakpoint (bochs) */ @@ -96,5 +101,8 @@ extern int CPU_HAS_LOCK(struct sShortSpinlock *Lock); extern void SHORTLOCK(struct sShortSpinlock *Lock); extern void SHORTREL(struct sShortSpinlock *Lock); +extern void Debug_PutCharDebug(char ch); +extern void Debug_PutStringDebug(const char *Str); + #endif