mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
fde03f8487
This change fixes a bug where gcc assumed thread synchronization such as pthread_cond_wait() wouldn't alter static variables, because the headers were using __attribute__((__leaf__)) inappropriately.
28 lines
717 B
C
28 lines
717 B
C
#ifndef COSMOPOLITAN_LIBC_RUNTIME_CXAATEXIT_H_
|
|
#define COSMOPOLITAN_LIBC_RUNTIME_CXAATEXIT_H_
|
|
#include "libc/stdio/stdio.h"
|
|
#include "libc/thread/tls.h"
|
|
COSMOPOLITAN_C_START_
|
|
|
|
struct CxaAtexitBlocks {
|
|
struct CxaAtexitBlock {
|
|
unsigned mask;
|
|
struct CxaAtexitBlock *next;
|
|
struct CxaAtexit {
|
|
void *fp;
|
|
void *arg;
|
|
void *pred;
|
|
} p[32];
|
|
} *p, root;
|
|
};
|
|
|
|
extern struct CxaAtexitBlocks __cxa_blocks;
|
|
|
|
void __cxa_lock(void) dontthrow;
|
|
void __cxa_unlock(void) dontthrow;
|
|
void __cxa_thread_finalize(void) dontthrow;
|
|
void __cxa_printexits(FILE *, void *) libcesque;
|
|
int __cxa_thread_atexit_impl(void *, void *, void *);
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* COSMOPOLITAN_LIBC_RUNTIME_CXAATEXIT_H_ */
|