mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +00:00
Improve locks and signals
- Introduce fast spinlock API - Double rand64() perf w/ spinlock - Improve raise() on New Technology - Support gettid() across platforms - Implement SA_NODEFER on New Technology - Move the lock intrinsics into LIBC_INTRIN - Make SIGTRAP recoverable on New Technology - Block SIGCHLD in wait4() on New Technology - Add threading prototypes for XNU and FreeBSD - Rewrite abort() fixing its minor bugs on XNU/NT - Shave down a lot of the content in libc/bits/bits.h - Let signal handlers modify CPU registers on New Technology
This commit is contained in:
parent
f68f1789bd
commit
046c7ebd4a
110 changed files with 1514 additions and 876 deletions
|
@ -80,15 +80,17 @@ struct WinArgs {
|
|||
extern int __pid;
|
||||
extern bool __nomultics;
|
||||
extern uint32_t __winmainpid;
|
||||
extern const char kConsoleHandles[2];
|
||||
extern const char kConsoleHandles[3];
|
||||
|
||||
static const short kConsoleModes[2] = {
|
||||
static const short kConsoleModes[3] = {
|
||||
kNtEnableProcessedInput | kNtEnableLineInput | kNtEnableEchoInput |
|
||||
kNtEnableMouseInput | kNtEnableQuickEditMode | kNtEnableExtendedFlags |
|
||||
kNtEnableAutoPosition | kNtEnableInsertMode |
|
||||
kNtEnableVirtualTerminalInput,
|
||||
kNtEnableProcessedOutput | kNtEnableWrapAtEolOutput |
|
||||
kNtEnableVirtualTerminalProcessing,
|
||||
kNtEnableProcessedOutput | kNtEnableWrapAtEolOutput |
|
||||
kNtEnableVirtualTerminalProcessing,
|
||||
};
|
||||
|
||||
forceinline void MakeLongDoubleLongAgain(void) {
|
||||
|
@ -128,7 +130,7 @@ static noasan textwindows wontreturn noinstrument void WinMainNew(
|
|||
STRACE("SetConsoleCP(kNtCpUtf8) → %hhhd", rc);
|
||||
rc = SetConsoleOutputCP(kNtCpUtf8);
|
||||
STRACE("SetConsoleOutputCP(kNtCpUtf8) → %hhhd", rc);
|
||||
for (i = 0; i < 2; ++i) {
|
||||
for (i = 0; i < 3; ++i) {
|
||||
hand = GetStdHandle(kConsoleHandles[i]);
|
||||
rc = GetConsoleMode(hand, __ntconsolemode + i);
|
||||
STRACE("GetConsoleMode(%p, [%#x]) → %hhhd", hand, __ntconsolemode[i], rc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue