mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-18 08:30:30 +00:00
Use dynamic memory for *NSYNC waiters
This commit is contained in:
parent
15af5c2d7e
commit
241f949540
12 changed files with 171 additions and 72 deletions
10
libc/errno.h
10
libc/errno.h
|
@ -28,11 +28,11 @@ COSMOPOLITAN_C_START_
|
|||
/* this header is included by 700+ files; therefore we */
|
||||
/* hand-roll &__get_tls()->tib_errno to avoid #include */
|
||||
/* cosmopolitan uses x28 as the tls register b/c apple */
|
||||
#define errno \
|
||||
(*({ \
|
||||
errno_t *__ep; \
|
||||
asm("sub\t%0,x28,#68" : "=r"(__ep)); \
|
||||
__ep; \
|
||||
#define errno \
|
||||
(*({ \
|
||||
errno_t *__ep; \
|
||||
asm("sub\t%0,x28,#192-0x3c" : "=r"(__ep)); \
|
||||
__ep; \
|
||||
}))
|
||||
#else
|
||||
#define errno (*__errno_location())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue