Make some minor fixups to bug reporting, etc.

This commit is contained in:
Justine Tunney 2022-07-11 05:55:17 -07:00
parent 84764ce7b8
commit 3f015b1e51
31 changed files with 244 additions and 134 deletions

View file

@ -26,9 +26,6 @@
#include "libc/thread/spawn.h"
#include "libc/thread/thread.h"
#define N 128
struct spawn t[N];
_Atomic(int) itworked;
_Thread_local int var;
@ -44,11 +41,12 @@ int Worker(void *arg, int tid) {
}
TEST(_spawn, test) {
long i;
for (i = 0; i < N; ++i) EXPECT_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));
EXPECT_EQ(N, itworked);
long i, n = 128;
struct spawn t[n];
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));
EXPECT_EQ(n, itworked);
}
__attribute__((__constructor__)) static void init(void) {