libuv 1.47.0.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4615 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-11-07 17:30:39 +00:00
parent 889773c38d
commit ee9cb63327
226 changed files with 6648 additions and 6444 deletions

View File

@@ -31,7 +31,7 @@ static volatile int num_threads;
static void thread_entry(void* arg) {
ASSERT(arg == (void *) 42);
ASSERT_PTR_EQ(arg, (void *) 42);
num_threads++;
/* FIXME write barrier? */
}
@@ -47,15 +47,15 @@ BENCHMARK_IMPL(thread_create) {
for (i = 0; i < NUM_THREADS; i++) {
r = uv_thread_create(&tid, thread_entry, (void *) 42);
ASSERT(r == 0);
ASSERT_OK(r);
r = uv_thread_join(&tid);
ASSERT(r == 0);
ASSERT_OK(r);
}
duration = (uv_hrtime() - start_time) / 1e9;
ASSERT(num_threads == NUM_THREADS);
ASSERT_EQ(num_threads, NUM_THREADS);
printf("%d threads created in %.2f seconds (%.0f/s)\n",
NUM_THREADS, duration, NUM_THREADS / duration);