libuv 1.43.0

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3735 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-01-05 02:04:05 +00:00
parent c02a3d3659
commit e2c25ab414
60 changed files with 1048 additions and 608 deletions

View File

@ -28,6 +28,9 @@ uv_thread_t subthreads[2];
static void check_thread(void* arg) {
uv_thread_t *thread_id = arg;
uv_thread_t self_id = uv_thread_self();
#ifdef _WIN32
ASSERT_NOT_NULL(self_id);
#endif
ASSERT(uv_thread_equal(&main_thread_id, &self_id) == 0);
*thread_id = uv_thread_self();
}
@ -35,6 +38,9 @@ static void check_thread(void* arg) {
TEST_IMPL(thread_equal) {
uv_thread_t threads[2];
main_thread_id = uv_thread_self();
#ifdef _WIN32
ASSERT_NOT_NULL(main_thread_id);
#endif
ASSERT(0 != uv_thread_equal(&main_thread_id, &main_thread_id));
ASSERT(0 == uv_thread_create(threads + 0, check_thread, subthreads + 0));
ASSERT(0 == uv_thread_create(threads + 1, check_thread, subthreads + 1));