313 |
{ |
{ |
314 |
/* When a thread starts, it blocks until the ILThreadStart function |
/* When a thread starts, it blocks until the ILThreadStart function |
315 |
has finished setup */ |
has finished setup */ |
316 |
_ILThreadSuspendSelf(thread); |
/* Wait until the starting thread has released the lock */ |
317 |
|
_ILMutexLock(&(thread->lock)); |
318 |
|
_ILMutexUnlock(&(thread->lock)); |
319 |
|
|
320 |
/* If we still have a startup function, then execute it. |
/* If we still have a startup function, then execute it. |
321 |
The field may have been replaced with NULL if the thread |
The field may have been replaced with NULL if the thread |
424 |
|
|
425 |
_ILThreadAdjustCount(1, (thread->state & IL_TS_BACKGROUND) ? 1 : 0); |
_ILThreadAdjustCount(1, (thread->state & IL_TS_BACKGROUND) ? 1 : 0); |
426 |
|
|
|
#if defined(GC_OPENBSD_THREADS) |
|
|
pthread_yield(); |
|
|
#endif |
|
|
|
|
|
/* Let the thread start running */ |
|
|
_ILThreadResumeSelf(thread); |
|
|
|
|
427 |
result = 1; |
result = 1; |
428 |
} |
} |
429 |
} |
} |