From 9adbe9b8389de06f597a5cb3e0044f3465c5c064 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 20 Dec 2022 07:59:38 +0300 Subject: Fix 'failed to get stack size for assertion' warning if winpthreads used (fix of commit bc1866b14) * pthread_support.c [GC_PTHREADS && !SN_TARGET_ORBIS && !SN_TARGET_PSP2 && GC_ASSERTIONS && !SOLARIS && GC_WIN32_PTHREADS] (GC_pthread_create): Do not WARN if stack_size is zero; update comment. --- pthread_support.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pthread_support.c') diff --git a/pthread_support.c b/pthread_support.c index 4c62d2f2..ddb15b9a 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -2534,10 +2534,10 @@ GC_API int GC_CALL GC_register_my_thread(const struct GC_stack_base *sb) ABORT("pthread_attr_getstacksize failed"); (void)pthread_attr_destroy(&my_attr); } - /* On Solaris 10, with default attr initialization, */ - /* stack_size remains 0. Fudge it. */ + /* On Solaris 10 and on Win32 with winpthreads, with the */ + /* default attr initialization, stack_size remains 0; fudge it. */ if (EXPECT(0 == stack_size, FALSE)) { -# ifndef SOLARIS +# if !defined(SOLARIS) && !defined(GC_WIN32_PTHREADS) WARN("Failed to get stack size for assertion checking\n", 0); # endif stack_size = 1000000; -- cgit v1.2.1