Initial import

This commit is contained in:
Justine Tunney 2020-06-15 07:18:57 -07:00
commit c91b3c5006
14915 changed files with 590219 additions and 0 deletions

44
libc/mach.h Normal file
View file

@ -0,0 +1,44 @@
#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 */
bool swtch(void);
bool swtch_pri(int pri);
#endif /* COSMOPOLITAN_LIBC_MACH_H_ */