2022-05-23 22:06:11 +00:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_CALLS_STATE_INTERNAL_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_CALLS_STATE_INTERNAL_H_
|
2022-09-10 09:56:25 +00:00
|
|
|
#include "libc/thread/thread.h"
|
|
|
|
#include "libc/thread/tls.h"
|
2022-05-23 22:06:11 +00:00
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
COSMOPOLITAN_C_START_
|
|
|
|
|
2023-07-24 15:31:54 +00:00
|
|
|
extern int __vforked;
|
|
|
|
extern bool __time_critical;
|
|
|
|
extern pthread_mutex_t __fds_lock_obj;
|
2023-09-10 15:12:43 +00:00
|
|
|
extern unsigned __sighandrvas[NSIG + 1];
|
|
|
|
extern unsigned __sighandflags[NSIG + 1];
|
2023-07-24 15:31:54 +00:00
|
|
|
extern const struct NtSecurityAttributes kNtIsInheritable;
|
2022-05-23 22:06:11 +00:00
|
|
|
|
2022-06-12 18:47:20 +00:00
|
|
|
void __fds_lock(void);
|
|
|
|
void __fds_unlock(void);
|
2022-10-16 19:05:08 +00:00
|
|
|
void __fds_funlock(void);
|
2022-06-12 18:47:20 +00:00
|
|
|
|
2022-10-16 19:05:08 +00:00
|
|
|
#define __vforked (__tls_enabled && (__get_tls()->tib_flags & TIB_FLAG_VFORKED))
|
|
|
|
|
2022-05-23 22:06:11 +00:00
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_CALLS_STATE_INTERNAL_H_ */
|