vbos/include/kernel/common.h
2026-04-11 11:35:31 -04:00

32 lines
611 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _COMMON_H_
#define _COMMON_H_
#define KSTACK_SIZE 0x4000
#include <limine/limine.h>
#include <kernel/types.h>
#include <lib/stdio.h>
#define PACKED __attribute__((packed))
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define ATTEMPT_WRITE(_x, _y) \
if (_x) { \
*(_x) = _y; \
}
#define RFLAGS_IF (1 << 9)
#define panic(...) \
{ \
kprintf(LOG_PANIC __VA_ARGS__); \
_panic(); \
}
void yield();
void _panic();
#endif /* _COMMON_H_ */