mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 01:21:08 +00:00
fixup to work with old compilers
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28750 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
13da6efeaf
commit
b6159c95bc
1 changed files with 9 additions and 6 deletions
|
@ -803,6 +803,9 @@ static void *nsthreadLauncher(void* thread)
|
||||||
|
|
||||||
- (void) start
|
- (void) start
|
||||||
{
|
{
|
||||||
|
pthread_attr_t attr;
|
||||||
|
pthread_t thr;
|
||||||
|
|
||||||
if (_active == YES)
|
if (_active == YES)
|
||||||
{
|
{
|
||||||
[NSException raise: NSInternalInconsistencyException
|
[NSException raise: NSInternalInconsistencyException
|
||||||
|
@ -838,14 +841,14 @@ static void *nsthreadLauncher(void* thread)
|
||||||
_active = YES;
|
_active = YES;
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
pthread_t thr;
|
|
||||||
pthread_attr_t attr;
|
|
||||||
pthread_attr_init(&attr);
|
pthread_attr_init(&attr);
|
||||||
// Create this thread detached, because we never use the return state from
|
/* Create this thread detached, because we never use the return state from
|
||||||
// threads.
|
* threads.
|
||||||
|
*/
|
||||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||||
// Set the stack size when the thread is created. Unlike the old setrlimit
|
/* Set the stack size when the thread is created. Unlike the old setrlimit
|
||||||
// code, this actually works.
|
* code, this actually works.
|
||||||
|
*/
|
||||||
if (_stackSize > 0)
|
if (_stackSize > 0)
|
||||||
{
|
{
|
||||||
pthread_attr_setstacksize(&attr, _stackSize);
|
pthread_attr_setstacksize(&attr, _stackSize);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue