mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Do more quality assurance work
This commit is contained in:
parent
67b19ae733
commit
d461c6f47d
31 changed files with 194 additions and 108 deletions
3
third_party/lua/lua.main.c
vendored
3
third_party/lua/lua.main.c
vendored
|
@ -54,9 +54,6 @@
|
|||
#include "tool/args/args.h"
|
||||
__static_yoink("lua_notice");
|
||||
|
||||
|
||||
STATIC_STACK_ALIGN(GetStackSize());
|
||||
|
||||
#if !defined(LUA_PROGNAME)
|
||||
#define LUA_PROGNAME "lua"
|
||||
#endif
|
||||
|
|
25
third_party/nsync/common.c
vendored
25
third_party/nsync/common.c
vendored
|
@ -36,6 +36,10 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/map.h"
|
||||
#include "libc/nt/runtime.h"
|
||||
#include "libc/intrin/directmap.internal.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/dce.h"
|
||||
#include "third_party/nsync/wait_s.internal.h"
|
||||
__static_yoink("nsync_notice");
|
||||
|
||||
|
@ -154,10 +158,19 @@ waiter *nsync_dll_waiter_samecond_ (struct Dll *e) {
|
|||
|
||||
static void *nsync_malloc (size_t size) {
|
||||
void *res;
|
||||
res = mmap (0, size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS,
|
||||
-1, 0);
|
||||
if (!IsWindows ()) {
|
||||
// too much of a performance hit to track
|
||||
res = __sys_mmap ((void *)0x7110000000, size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS,
|
||||
-1, 0, 0);
|
||||
} else {
|
||||
// must be tracked for fork() resurrection
|
||||
res = mmap (0, size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS,
|
||||
-1, 0);
|
||||
}
|
||||
if (res == MAP_FAILED)
|
||||
nsync_panic_ ("out of memory\n");
|
||||
return res;
|
||||
|
@ -168,7 +181,7 @@ static void *nsync_malloc (size_t size) {
|
|||
static struct Dll *free_waiters = NULL;
|
||||
|
||||
/* free_waiters points to a doubly-linked list of free waiter structs. */
|
||||
static nsync_atomic_uint32_ free_waiters_mu; /* spinlock; protects free_waiters */
|
||||
nsync_atomic_uint32_ free_waiters_mu; /* spinlock; protects free_waiters */
|
||||
|
||||
#define waiter_for_thread __get_tls()->tib_nsync
|
||||
|
||||
|
@ -236,6 +249,8 @@ void nsync_waiter_free_ (waiter *w) {
|
|||
nsync_spin_test_and_set_ (&free_waiters_mu, 1, 1, 0);
|
||||
dll_make_first (&free_waiters, &w->nw.q);
|
||||
ATM_STORE_REL (&free_waiters_mu, 0); /* release store */
|
||||
if (w == waiter_for_thread)
|
||||
waiter_for_thread = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
3
third_party/python/freeze.c
vendored
3
third_party/python/freeze.c
vendored
|
@ -7,7 +7,6 @@
|
|||
#include "libc/assert.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/stack.h"
|
||||
#include "third_party/python/Include/bytesobject.h"
|
||||
#include "third_party/python/Include/compile.h"
|
||||
#include "third_party/python/Include/fileutils.h"
|
||||
|
@ -18,8 +17,6 @@
|
|||
#include "third_party/python/Include/pymacro.h"
|
||||
#include "third_party/python/Include/pythonrun.h"
|
||||
|
||||
STATIC_STACK_ALIGN(GetStackSize());
|
||||
|
||||
#define HEADER "\
|
||||
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│\n\
|
||||
│ vi: set et ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi │\n\
|
||||
|
|
3
third_party/python/launch.c
vendored
3
third_party/python/launch.c
vendored
|
@ -13,7 +13,6 @@
|
|||
#include "libc/log/log.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/stack.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
#include "third_party/python/Include/abstract.h"
|
||||
|
@ -39,8 +38,6 @@
|
|||
#include "third_party/python/Include/warnings.h"
|
||||
#include "third_party/python/Include/yoink.h"
|
||||
|
||||
STATIC_STACK_ALIGN(GetStackSize());
|
||||
|
||||
#define USE_COSMO_CRASH MODE_DBG + 0
|
||||
|
||||
__static_yoink("zipos");
|
||||
|
|
2
third_party/python/pyobj.c
vendored
2
third_party/python/pyobj.c
vendored
|
@ -64,8 +64,6 @@
|
|||
#include "libc/serialize.h"
|
||||
#include "tool/build/lib/stripcomponents.h"
|
||||
|
||||
STATIC_STACK_ALIGN(GetStackSize());
|
||||
|
||||
__static_yoink("_PyUnicode_GetCode");
|
||||
|
||||
#define MANUAL "\
|
||||
|
|
3
third_party/python/python3.c
vendored
3
third_party/python/python3.c
vendored
|
@ -4,13 +4,10 @@
|
|||
│ Python 3 │
|
||||
│ https://docs.python.org/3/license.html │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/runtime/stack.h"
|
||||
#include "third_party/python/Include/yoink.h"
|
||||
#include "third_party/python/runpythonmodule.h"
|
||||
#include "tool/args/args.h"
|
||||
|
||||
STATIC_STACK_ALIGN(GetStackSize());
|
||||
|
||||
PYTHON_YOINK("xed");
|
||||
PYTHON_YOINK("xterm");
|
||||
|
||||
|
|
3
third_party/python/pythontester.c
vendored
3
third_party/python/pythontester.c
vendored
|
@ -6,13 +6,10 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/stack.h"
|
||||
#include "third_party/python/Include/yoink.h"
|
||||
#include "third_party/python/runpythonmodule.h"
|
||||
#include "tool/args/args.h"
|
||||
|
||||
STATIC_STACK_ALIGN(GetStackSize());
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
|
3
third_party/python/repl.c
vendored
3
third_party/python/repl.c
vendored
|
@ -4,13 +4,10 @@
|
|||
│ Python 3 │
|
||||
│ https://docs.python.org/3/license.html │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/runtime/stack.h"
|
||||
#include "third_party/python/Include/yoink.h"
|
||||
#include "third_party/python/runpythonmodule.h"
|
||||
#include "tool/args/args.h"
|
||||
|
||||
STATIC_STACK_ALIGN(GetStackSize());
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue