mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Tidy up the threading implementation
The organization of the source files is now much more rational. Old experiments that didn't work out are now deleted. Naming of things like files is now more intuitive.
This commit is contained in:
parent
e9272f03fb
commit
155b378a39
199 changed files with 526 additions and 685 deletions
|
@ -26,7 +26,7 @@
|
|||
#include "libc/errno.h"
|
||||
#include "libc/intrin/asan.internal.h"
|
||||
#include "libc/intrin/nopl.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nt/enum/fileflagandattributes.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/internal.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_STDIO_FFLUSH_H_
|
||||
#define COSMOPOLITAN_LIBC_STDIO_FFLUSH_H_
|
||||
#include "libc/intrin/nopl.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/intrin/pushpop.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/mem/arraylist.internal.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/stdio/fflush.internal.h"
|
||||
#include "libc/stdio/lock.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
|
|
|
@ -27,11 +27,10 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/errno.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/gettls.h"
|
||||
#include "libc/stdio/iconv.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/str/locale.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/thread/tls.h"
|
||||
// clang-format off
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
|
@ -283,7 +282,7 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
|
|||
int err;
|
||||
unsigned char type = map[-1];
|
||||
unsigned char totype = tomap[-1];
|
||||
locale_t *ploc = &((cthread_t)__get_tls())->locale;
|
||||
locale_t *ploc = (locale_t *)&__get_tls()->tib_locale;
|
||||
locale_t loc = *ploc;
|
||||
|
||||
if (!in || !*in || !*inb) return 0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_STDIO_LOCK_H_
|
||||
#define COSMOPOLITAN_LIBC_STDIO_LOCK_H_
|
||||
#include "libc/intrin/nopl.h"
|
||||
#include "libc/nexgen32e/threaded.h"
|
||||
#include "libc/thread/tls.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
|
||||
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│
|
||||
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
|
||||
│vi: set et ft=asm ts=8 tw=8 fenc=utf-8 :vi│
|
||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
||||
│ This is free and unencumbered software released into the public domain. │
|
||||
│ │
|
||||
|
@ -26,5 +26,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
|
||||
readdir64: jmp readdir
|
||||
readdir64:
|
||||
jmp readdir
|
||||
.endfn readdir64,globl
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/sysv/consts/fileno.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
||||
.init.start 400,_init_stderr
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/sysv/consts/fileno.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
||||
.init.start 400,_init_stdin
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_STDIO_STDIO_H_
|
||||
#define COSMOPOLITAN_LIBC_STDIO_STDIO_H_
|
||||
#include "libc/fmt/pflink.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
|
||||
#define _STDIO_H
|
||||
#define L_ctermid 20
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/sysv/consts/fileno.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
||||
.init.start 400,_init_stdout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue