Changeset View
Changeset View
Standalone View
Standalone View
lib/libthr/thread/thr_exit.c
Show First 20 Lines • Show All 274 Lines • ▼ Show 20 Lines | |||||
#endif /* _PTHREAD_FORCED_UNWIND */ | #endif /* _PTHREAD_FORCED_UNWIND */ | ||||
} | } | ||||
static void | static void | ||||
exit_thread(void) | exit_thread(void) | ||||
{ | { | ||||
struct pthread *curthread = _get_curthread(); | struct pthread *curthread = _get_curthread(); | ||||
free(curthread->name); | |||||
curthread->name = NULL; | |||||
/* Check if there is thread specific data: */ | /* Check if there is thread specific data: */ | ||||
if (curthread->specific != NULL) { | if (curthread->specific != NULL) { | ||||
/* Run the thread-specific data destructors: */ | /* Run the thread-specific data destructors: */ | ||||
_thread_cleanupspecific(); | _thread_cleanupspecific(); | ||||
} | } | ||||
if (!_thr_isthreaded()) | if (!_thr_isthreaded()) | ||||
exit(0); | exit(0); | ||||
Show All 36 Lines |