mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Introduce #include <cosmo.h>
to toolchain users
This change improves the way internal APIs are being hidden behind the `COSMO` define. The cosmo.h header will take care of defining that, so that a separate define statement isn't needed. This change also does a lot more to define which APIs are standard, and which belong to Cosmo.
This commit is contained in:
parent
9b55dbe417
commit
4a59210008
115 changed files with 699 additions and 422 deletions
49
libc/mach.h
49
libc/mach.h
|
@ -1,49 +0,0 @@
|
|||
#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 */
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
bool swtch(void);
|
||||
bool swtch_pri(int);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_MACH_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue