Differences From Artifact [5e32541977]:
- File
src/threading_pthread.m
— part of check-in
[60ebb21fc7]
at
2015-04-11 14:37:34
on branch trunk
— threading_pthread.m: Only set stack size if > 0
When initializing a pthread_attr_t on Solaris and reading the stack size
from it with pthread_attr_getstacksize(), the stack size returned it 0.
However, when calling pthread_attr_setstacksize() with a stack size of
0, the call fails. (user: js, size: 5061) [annotate] [blame] [check-ins using]
To Artifact [f28edc28f4]:
- File src/threading_pthread.m — part of check-in [1ba08eebc5] at 2015-10-19 22:15:13 on branch trunk — Add platform.h & make platform defines consistent (user: js, size: 5122) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #ifdef HAVE_PTHREAD_NP_H # include <pthread_np.h> #endif struct thread_ctx { void (*function)(id object); id object; }; static void* | > > > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #ifdef HAVE_PTHREAD_NP_H # include <pthread_np.h> #endif #import "macros.h" struct thread_ctx { void (*function)(id object); id object; }; static void* |
︙ | ︙ | |||
159 160 161 162 163 164 165 | OF_UNREACHABLE } void of_thread_set_name(of_thread_t thread, const char *name) { | | | | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | OF_UNREACHABLE } void of_thread_set_name(of_thread_t thread, const char *name) { #if defined(OF_HAIKU) rename_thread(get_pthread_thread_id(thread), name); #elif defined(HAVE_PTHREAD_SET_NAME_NP) pthread_set_name_np(pthread_self(), name); #elif defined(HAVE_PTHREAD_SETNAME_NP) # if defined(OF_MAC_OS_X) || defined(OF_IOS) pthread_setname_np(name); # elif defined(__GLIBC__) char buffer[16]; strncpy(buffer, name, 15); buffer[15] = 0; |
︙ | ︙ |