Favor siginfo_t over struct siginfo

This commit is contained in:
Justine Tunney 2024-05-28 02:34:17 -07:00
parent c638eabfe0
commit deaef81463
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
20 changed files with 37 additions and 39 deletions

View file

@ -8,7 +8,7 @@ extern bool32 g_isrunningundermake;
void __start_fatal(const char *, int);
void __restore_tty(void);
void __oncrash(int, struct siginfo *, void *);
void __oncrash(int, siginfo_t *, void *);
COSMOPOLITAN_C_END_
#endif /* COSMOPOLITAN_LIBC_LOG_INTERNAL_H_ */

View file

@ -188,9 +188,9 @@ relegated static char *ShowSseRegisters(char *p, ucontext_t *ctx) {
return p;
}
void ShowCrashReportHook(int, int, int, struct siginfo *, ucontext_t *);
void ShowCrashReportHook(int, int, int, siginfo_t *, ucontext_t *);
static relegated void ShowCrashReport(int err, int sig, struct siginfo *si,
static relegated void ShowCrashReport(int err, int sig, siginfo_t *si,
ucontext_t *ctx) {
#pragma GCC push_options
#pragma GCC diagnostic ignored "-Walloca-larger-than="
@ -267,7 +267,7 @@ static inline void SpinUnlock(atomic_uint *lock) {
atomic_store_explicit(lock, 0, memory_order_release);
}
relegated void __oncrash(int sig, struct siginfo *si, void *arg) {
relegated void __oncrash(int sig, siginfo_t *si, void *arg) {
static atomic_uint lock;
BLOCK_CANCELATION;
SpinLock(&lock);

View file

@ -189,8 +189,7 @@ static relegated char *GetSymbolName(struct SymbolTable *st, int symbol) {
return buf;
}
static relegated void __oncrash_impl(int sig, struct siginfo *si,
ucontext_t *ctx) {
static relegated void __oncrash_impl(int sig, siginfo_t *si, ucontext_t *ctx) {
#pragma GCC push_options
#pragma GCC diagnostic ignored "-Walloca-larger-than="
long size = __get_safe_size(10000, 4096);
@ -389,7 +388,7 @@ static inline void SpinUnlock(atomic_uint *lock) {
atomic_store_explicit(lock, 0, memory_order_release);
}
relegated void __oncrash(int sig, struct siginfo *si, void *arg) {
relegated void __oncrash(int sig, siginfo_t *si, void *arg) {
static atomic_uint lock;
BLOCK_CANCELATION;
SpinLock(&lock);