mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Fix MODE=tiny build
This commit is contained in:
parent
3f015b1e51
commit
9877c04fac
2 changed files with 8 additions and 4 deletions
|
@ -22,6 +22,8 @@
|
||||||
#include "libc/intrin/spinlock.h"
|
#include "libc/intrin/spinlock.h"
|
||||||
#include "libc/intrin/wait0.internal.h"
|
#include "libc/intrin/wait0.internal.h"
|
||||||
#include "libc/math.h"
|
#include "libc/math.h"
|
||||||
|
#include "libc/mem/mem.h"
|
||||||
|
#include "libc/runtime/gc.internal.h"
|
||||||
#include "libc/runtime/stack.h"
|
#include "libc/runtime/stack.h"
|
||||||
#include "libc/stdio/stdio.h"
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/sysv/consts/clone.h"
|
#include "libc/sysv/consts/clone.h"
|
||||||
|
@ -58,10 +60,10 @@ int Worker(void *p, int tid) {
|
||||||
|
|
||||||
TEST(dtoa, locks) {
|
TEST(dtoa, locks) {
|
||||||
int i, n = 32;
|
int i, n = 32;
|
||||||
struct spawn th[n];
|
struct spawn *t = gc(malloc(sizeof(struct spawn) * n));
|
||||||
if (IsOpenbsd()) return; // TODO(jart): OpenBSD flakes :'(
|
if (IsOpenbsd()) return; // TODO(jart): OpenBSD flakes :'(
|
||||||
for (i = 0; i < n; ++i) ASSERT_SYS(0, 0, _spawn(Worker, 0, th + i));
|
for (i = 0; i < n; ++i) ASSERT_SYS(0, 0, _spawn(Worker, 0, t + i));
|
||||||
for (i = 0; i < n; ++i) EXPECT_SYS(0, 0, _join(th + i));
|
for (i = 0; i < n; ++i) EXPECT_SYS(0, 0, _join(t + i));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#include "libc/calls/syscall-sysv.internal.h"
|
#include "libc/calls/syscall-sysv.internal.h"
|
||||||
#include "libc/intrin/kprintf.h"
|
#include "libc/intrin/kprintf.h"
|
||||||
#include "libc/macros.internal.h"
|
#include "libc/macros.internal.h"
|
||||||
|
#include "libc/mem/mem.h"
|
||||||
|
#include "libc/runtime/gc.internal.h"
|
||||||
#include "libc/testlib/testlib.h"
|
#include "libc/testlib/testlib.h"
|
||||||
#include "libc/thread/spawn.h"
|
#include "libc/thread/spawn.h"
|
||||||
#include "libc/thread/thread.h"
|
#include "libc/thread/thread.h"
|
||||||
|
@ -42,7 +44,7 @@ int Worker(void *arg, int tid) {
|
||||||
|
|
||||||
TEST(_spawn, test) {
|
TEST(_spawn, test) {
|
||||||
long i, n = 128;
|
long i, n = 128;
|
||||||
struct spawn t[n];
|
struct spawn *t = gc(malloc(sizeof(struct spawn) * n));
|
||||||
for (i = 0; i < n; ++i) ASSERT_SYS(0, 0, _spawn(Worker, (void *)i, t + i));
|
for (i = 0; i < n; ++i) ASSERT_SYS(0, 0, _spawn(Worker, (void *)i, t + i));
|
||||||
for (i = 0; i < n; ++i) EXPECT_SYS(0, 0, _join(t + i));
|
for (i = 0; i < n; ++i) EXPECT_SYS(0, 0, _join(t + i));
|
||||||
for (i = 0; i < n; ++i) EXPECT_SYS(0, 0, _join(t + i));
|
for (i = 0; i < n; ++i) EXPECT_SYS(0, 0, _join(t + i));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue