Direct call exit if thread was never created. This makes it safe to call
pthread_exit in main() without creating any thread. Tessted by: deischen
This commit is contained in:
parent
e81bbed597
commit
962eaaf9d6
@ -87,6 +87,8 @@ _pthread_exit(void *status)
|
||||
{
|
||||
struct pthread *curthread = _get_curthread();
|
||||
|
||||
if (!_kse_isthreaded())
|
||||
exit(0);
|
||||
/* Check if this thread is already in the process of exiting: */
|
||||
if ((curthread->flags & THR_FLAGS_EXITING) != 0) {
|
||||
char msg[128];
|
||||
|
@ -87,6 +87,8 @@ _pthread_exit(void *status)
|
||||
{
|
||||
struct pthread *curthread = _get_curthread();
|
||||
|
||||
if (!_kse_isthreaded())
|
||||
exit(0);
|
||||
/* Check if this thread is already in the process of exiting: */
|
||||
if ((curthread->flags & THR_FLAGS_EXITING) != 0) {
|
||||
char msg[128];
|
||||
|
Loading…
Reference in New Issue
Block a user