#ifndef KERNEL_HAL_HAL_H_
#define KERNEL_HAL_HAL_H_

#include <stdint.h>
#include <stddef.h>

__attribute__((noreturn)) void hal_hang(void);

void hal_init(void);
void hal_intr_disable(void);
void hal_intr_enable(void);
void *hal_memset(void *p, int c, size_t n);
void *hal_memcpy(void *dst, const void *src, size_t n);
size_t hal_strlen(char *s);
int hal_memcmp(const void *s1, const void *s2, int len);
int hal_strcmp(const char *a, const char *b);
size_t hal_strcspn(const char *s, const char *reject);
size_t hal_strspn(const char *s, const char *accept);
char *hal_strcpy(char *dest, const char *src);
char *hal_strchr(const char *s, int c);
void hal_wait(uint32_t ms);
int32_t hal_randnum(void);

#define HAL_PAGE_SIZE 0x1000
#include "x86_64/vmm.h"
#include "x86_64/switch.h"
#include "x86_64/paging.h"
#include "x86_64/intr.h"
#include "x86_64/io.h"
#include "x86_64/gdt.h"

#endif // KERNEL_HAL_HAL_H_
