cosmopolitan/libc/mach.internal.h

48 lines
4.4 KiB
C
Raw Permalink Normal View History

2020-06-15 14:18:57 +00:00
#ifndef COSMOPOLITAN_LIBC_MACH_H_
#define COSMOPOLITAN_LIBC_MACH_H_
/* ▄▄███▄
2021-03-17 05:19:51 +00:00
cosmopolitan § xnu's not unix! » carnegie mellon mach microkernel
2020-06-15 14:18:57 +00:00
*/
#define XNU_SYSCALL_MASK_MACH 0x1000000
#define XNU_SYSCALL_MASK_UNIX 0x2000000
#define XNU_SYSCALL_MASK_MACH_IPC 0x5000000
#define kXnuCommonPage 0x00007fffffe00000
#define kXnuNtTscBase 0x050 /* uint64_t */
#define kXnuNtScale 0x058 /* uint32_t */
#define kXnuNtShift 0x05c /* uint32_t */
#define kXnuNtNsBase 0x060 /* uint64_t */
#define kXnuNtGeneration 0x068 /* uint32_t */
2021-03-17 05:19:51 +00:00
COSMOPOLITAN_C_START_
2020-06-15 14:18:57 +00:00
bool swtch(void);
2021-03-17 05:19:51 +00:00
bool swtch_pri(int);
2020-06-15 14:18:57 +00:00
2021-03-17 05:19:51 +00:00
COSMOPOLITAN_C_END_
2020-06-15 14:18:57 +00:00
#endif /* COSMOPOLITAN_LIBC_MACH_H_ */