diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-12-20 07:59:38 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-12-20 12:27:49 +0300 |
commit | 9adbe9b8389de06f597a5cb3e0044f3465c5c064 (patch) | |
tree | 72fffbb767a95d10bed95ef10d107065f1597b4b /pthread_support.c | |
parent | d8a88dcd6ab8632cdd2a8b048e0cbf9c7d92a582 (diff) | |
download | bdwgc-9adbe9b8389de06f597a5cb3e0044f3465c5c064.tar.gz |
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.
Diffstat (limited to 'pthread_support.c')
-rw-r--r-- | pthread_support.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |