mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Introduce __cxa_thread_atexit()
This commit is contained in:
parent
a699cda5c8
commit
ee82f90bba
6 changed files with 98 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "libc/atomic.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/atomic.h"
|
||||
#include "libc/intrin/cxaatexit.internal.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/limits.h"
|
||||
|
@ -110,6 +111,9 @@ wontreturn void pthread_exit(void *rc) {
|
|||
|
||||
// free resources
|
||||
_pthread_unwind(pt);
|
||||
if (_weaken(__cxa_thread_finalize)) {
|
||||
_weaken(__cxa_thread_finalize)();
|
||||
}
|
||||
_pthread_unkey(tib);
|
||||
_pthread_ungarbage();
|
||||
_pthread_decimate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue