Improve pthread_cleanup_{push,pop}.

This commit is contained in:
4lDO2
2023-04-27 13:23:59 +02:00
parent 714e73112d
commit 8d9dd0df45
3 changed files with 17 additions and 16 deletions
+2
View File
@@ -222,6 +222,8 @@ pub(crate) struct CleanupLinkedListEntry {
#[thread_local]
pub(crate) static CLEANUP_LL_HEAD: Cell<*const CleanupLinkedListEntry> = Cell::new(core::ptr::null());
// TODO: unwind? setjmp/longjmp?
#[no_mangle]
pub unsafe extern "C" fn __relibc_internal_pthread_cleanup_push(new_entry: *mut c_void) {
let new_entry = &mut *new_entry.cast::<CleanupLinkedListEntry>();