mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-19 09:00:31 +00:00
Make improvements
This commit is contained in:
parent
3e4fd4b0ad
commit
e44a0cf6f8
256 changed files with 23100 additions and 2294 deletions
|
@ -1,5 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_NT_CODEGEN_H_
|
||||
#define COSMOPOLITAN_LIBC_NT_CODEGEN_H_
|
||||
#include "ape/idata.internal.h"
|
||||
#include "ape/macros.h"
|
||||
#include "ape/macros.internal.h"
|
||||
#endif /* COSMOPOLITAN_LIBC_NT_CODEGEN_H_ */
|
||||
|
|
|
@ -166,8 +166,8 @@ o/libc/nt/ntdllimport.inc: \
|
|||
ape/relocations.h \
|
||||
libc/nt/ntdllimport.h \
|
||||
libc/macros.h \
|
||||
libc/macros.inc \
|
||||
libc/macros-cpp.inc
|
||||
libc/macros.internal.inc \
|
||||
libc/macros-cpp.internal.inc
|
||||
|
||||
#───────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@ COSMOPOLITAN_C_START_
|
|||
│ cosmopolitan § new technology » synchronization ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
|
||||
#define InterlockedAdd(PTR, VAL) \
|
||||
({ \
|
||||
typeof(*(PTR)) Res; \
|
||||
typeof(Res) Val = (VAL); \
|
||||
asm volatile("xadd\t%0,%1" : "=r"(Res), "+m"(*(PTR)) : "0"(Val)); \
|
||||
Res + Val; \
|
||||
#define InterlockedAdd(PTR, VAL) \
|
||||
({ \
|
||||
typeof(*(PTR)) Res; \
|
||||
typeof(Res) Val = (VAL); \
|
||||
asm volatile("lock xadd\t%0,%1" : "=r"(Res), "+m"(*(PTR)) : "0"(Val)); \
|
||||
Res + Val; \
|
||||
})
|
||||
|
||||
#define InterlockedExchange(PTR, VAL) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue