mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Make improvements
- Improved async signal safety of read() particularly for longjmp() - Started adding cancel cleanup handlers for locks / etc on Windows - Make /dev/tty work better particularly for uses like `foo | less` - Eagerly read console input into a linked list, so poll can signal - Fix some libc definitional bugs, which configure scripts detected
This commit is contained in:
parent
d6c2830850
commit
0c5dd7b342
85 changed files with 1062 additions and 671 deletions
|
@ -39,6 +39,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/crc32.h"
|
||||
#include "libc/nt/runtime.h"
|
||||
#include "libc/nt/synchronization.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/stack.h"
|
||||
#include "libc/runtime/syslib.internal.h"
|
||||
|
@ -149,6 +150,11 @@ static errno_t pthread_create_impl(pthread_t *thread,
|
|||
}
|
||||
pt->start = start_routine;
|
||||
pt->arg = arg;
|
||||
if (IsWindows()) {
|
||||
if (!(pt->semaphore = CreateSemaphore(0, 0, 1, 0))) {
|
||||
notpossible;
|
||||
}
|
||||
}
|
||||
|
||||
// create thread local storage memory
|
||||
if (!(pt->tls = _mktls(&pt->tib))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue