#include "int_lib.h"
#if defined(__linux__)
#include <assert.h>
#endif
#include <stddef.h>
#if __APPLE__
#include <libkern/OSCacheControl.h>
#endif
#if defined(_WIN32)
uint32_t FlushInstructionCache(uintptr_t hProcess, void *lpBaseAddress,
uintptr_t dwSize);
uintptr_t GetCurrentProcess(void);
#endif
#if defined(__FreeBSD__) && defined(__arm__)
#include <sys/types.h>
#include <machine/sysarch.h>
#endif
#if defined(__NetBSD__) && defined(__arm__)
#include <machine/sysarch.h>
#endif
#if defined(__OpenBSD__) && (defined(__arm__) || defined(__mips__) || defined(__riscv))
#include <sys/types.h>
#include <machine/sysarch.h>
#endif
#if defined(__linux__) && defined(__mips__)
#include <sys/cachectl.h>
#include <sys/syscall.h>
#include <unistd.h>
#endif
#if defined(__linux__) && defined(__riscv)
#include <linux/unistd.h>
#endif
void __clear_cache(void *start, void *end) { … }