#ifndef MRT_SYSCALL_H
#define MRT_SYSCALL_H
#include <ctime>
#if defined(_WIN64)
#include <pthread.h>
#elif defined(__APPLE__)
#include <pthread.h>
#include <unistd.h>
#else
#include <sys/prctl.h>
#include "linux/futex.h"
#endif
namespace MapleRuntime {
#if defined(__linux__) || defined(hongmeng)
int Futex(const volatile int* uaddr, int op, int val);
#endif
pid_t GetTid();
int GetPid();
#if defined(__linux__) || defined(hongmeng)
#ifndef PR_SET_VMA
#define PR_SET_VMA 0x53564d41
#define PR_SET_VMA_ANON_NAME 0
#endif
#define MRT_PRCTL(base_address, allocated_size, mmtag) \
(void)prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, base_address, allocated_size, mmtag)
#endif
}
#endif