cosmopolitan/libc/nt/signals.h

56 lines
4.3 KiB
C
Raw Normal View History

2020-06-15 14:18:57 +00:00
#ifndef COSMOPOLITAN_LIBC_NT_EXCEPTIONS_H_
#define COSMOPOLITAN_LIBC_NT_EXCEPTIONS_H_
#include "libc/nt/struct/context.h"
#include "libc/nt/struct/ntexceptionpointers.h"
2020-06-15 14:18:57 +00:00
#include "libc/nt/thunk/msabi.h"
/* ░░░░
cosmopolitan § new technology » signals
*/
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
typedef int (*NtTopLevelExceptionFilter)(const struct NtExceptionPointers *);
typedef int32_t (*NtVectoredExceptionHandler)(struct NtExceptionPointers *);
2020-06-15 14:18:57 +00:00
int SetErrorMode(int uMode);
2020-06-15 14:18:57 +00:00
int64_t AddVectoredExceptionHandler(uint32_t First,
NtVectoredExceptionHandler pHandler);
int64_t AddVectoredContinueHandler(uint32_t First,
NtVectoredExceptionHandler pHandler);
uint32_t RemoveVectoredExceptionHandler(int64_t hHandle);
uint32_t RemoveVectoredContinueHandler(int64_t hHandle);
NtTopLevelExceptionFilter SetUnhandledExceptionFilter(
NtTopLevelExceptionFilter opt_lpTopLevelExceptionFilter);
#if ShouldUseMsabiAttribute()
#include "libc/nt/thunk/signals.inc"
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_NT_EXCEPTIONS_H_ */