mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-13 14:39:10 +00:00
Use *NSYNC for POSIX threads locking APIs
Condition variables, barriers, and r/w locks now work very well.
This commit is contained in:
parent
3de35e196c
commit
b5cb71ab84
197 changed files with 3734 additions and 3817 deletions
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||
.syscon futex,FUTEX_PRIVATE_FLAG,128,0,0,128,128,0
|
||||
.syscon futex,FUTEX_PRIVATE_FLAG,128,0,0,128,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||
.syscon futex,FUTEX_REQUEUE,3,0,0,3,3,0
|
||||
.syscon futex,FUTEX_REQUEUE,3,0,0,3,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||
.syscon futex,FUTEX_WAKE,1,0,0,2,1,0
|
||||
.syscon futex,FUTEX_WAKE,1,0,0,2,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||
.syscon misc,SOMAXCONN,0x80,0x80,0x80,0x80,0x80,0x7fffffff
|
||||
.syscon limits,SOMAXCONN,4096,128,128,128,128,2147483647
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/consts/syscon.internal.inc"
|
||||
.syscon nr,__NR_futex,0x00ca,0xfff,0xfff,0x0053,0x0a6,0xfff
|
||||
.syscon nr,__NR_futex,0x00ca,0xfff,0xfff,0x0053,0xfff,0xfff
|
||||
|
|
|
@ -2,21 +2,25 @@
|
|||
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FUTEX_H_
|
||||
#include "libc/runtime/symbolic.h"
|
||||
|
||||
#define FUTEX_WAIT SYMBOLIC(FUTEX_WAIT)
|
||||
#define FUTEX_WAKE SYMBOLIC(FUTEX_WAKE)
|
||||
#define FUTEX_REQUEUE SYMBOLIC(FUTEX_REQUEUE)
|
||||
#define FUTEX_PRIVATE_FLAG SYMBOLIC(FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_WAIT SYMBOLIC(FUTEX_WAIT)
|
||||
#define FUTEX_WAKE SYMBOLIC(FUTEX_WAKE)
|
||||
#define FUTEX_REQUEUE SYMBOLIC(FUTEX_REQUEUE)
|
||||
#define FUTEX_PRIVATE_FLAG 128
|
||||
|
||||
#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
|
||||
#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
|
||||
|
||||
#define FUTEX_WAIT_BITSET 9
|
||||
#define FUTEX_CLOCK_REALTIME 256
|
||||
#define FUTEX_BITSET_MATCH_ANY 0xffffffff
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern const int FUTEX_WAIT;
|
||||
extern const int FUTEX_WAKE;
|
||||
extern const int FUTEX_REQUEUE;
|
||||
extern const int FUTEX_PRIVATE_FLAG;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
|
@ -10,7 +10,7 @@ extern const int SS_DISABLE;
|
|||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
||||
#define SIGSTKSZ STACKSIZE
|
||||
#define SIGSTKSZ FRAMESIZE
|
||||
#define MINSIGSTKSZ 32768
|
||||
#define SS_ONSTACK 1
|
||||
#define SS_DISABLE SS_DISABLE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue