cosmopolitan/libc/mach.internal.h
Justine Tunney fa20edc44d
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
2023-11-28 14:39:42 -08:00

48 lines
4.4 KiB
C

#ifndef COSMOPOLITAN_LIBC_MACH_H_
#define COSMOPOLITAN_LIBC_MACH_H_
/* ▄▄███▄
▄▄████████▄
▄█████████████▄
▄▄███▓▓▓▓▓▓▓▓▓▓▓███▄
▄▄█████▓▓▓█████████▓▓▓██▄
▄▄████████▓▓▓███████▓▓▓▓▓████▄
▄█████░░░████▓▓█████▓▓▓▓█████████▄
▄▄█████████░░░███▓▓█▓▓▓▓▒███████▓▓▒███▄
▄██████████████░░░██▓▓▓▓███████████▓▓█████▄
██████████████████░░░██▓▓▓█████████▓▓▓███████▄
███░░░░░░█████████▓░░███▓▓▓▓▓▓▓▓▓▓▓█████▒▒▒██▄
█░███░░░██░░░░░░░░░██░░██████████████▒▒▒▒██████▄
███████░░░█████████░░░░░░█████████▒▒▒▒▒██████████▄
█████ ██░░░███████████████████▒▒▒▒▒██░▒▒██████████▄
██████ ██░░░██████████████░███▒████████▒▒██████████▄
████████ ███░░█████████████░░████████████▒▒███████████
█████████ ███░░███████████░░██████████████▒▒███████████
▄██████████ ██████████████ ░░███████████████▒▒███████████
████████████ ███░░░░░█████░░█████████████████▒▒██████ █
█████████████ ██████░░░░░░░▒█████████████████████ ████▀
█████████████ ██████████░░░░░░░░░███████████ ████████
█████████████ ████████░░███████░░░██████ ▓██████████
█████████████ ██████░░░████████████ █████████████
╔────────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § xnu's not unix! » carnegie mellon mach microkernel ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
#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 */
COSMOPOLITAN_C_START_
bool swtch(void);
bool swtch_pri(int);
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_MACH_H_ */