MOS Source Code
Loading...
Searching...
No Matches
signal_types.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
5#include <abi-bits/signal.h>
6#include <mos/mos_global.h>
7
8#define SIGNAL_MAX_N NSIG
9typedef int signal_t;
10typedef struct
11{
12 __sighandler handler;
13 unsigned long sa_flags;
14 void (*sa_restorer)(void);
16
17MOS_STATIC_ASSERT(sizeof(sigaction_t) == 24, "update sigaction_t struct size");
18
19MOS_STATIC_ASSERT(offsetof(struct sigaction, __sa_handler) == offsetof(sigaction_t, handler), "update sigaction_t struct layout");
20MOS_STATIC_ASSERT(offsetof(struct sigaction, sa_flags) == offsetof(sigaction_t, sa_flags), "update sigaction_t struct layout");
21MOS_STATIC_ASSERT(offsetof(struct sigaction, sa_restorer) == offsetof(sigaction_t, sa_restorer), "update sigaction_t struct layout");
MOSAPI void(1, 2) fatal_abort(const char *fmt
#define MOS_STATIC_ASSERT
Definition mos_global.h:14
#define offsetof(st, m)
Definition pb_syshdr.h:43
int signal_t
Definition signal_types.h:9
unsigned long sa_flags
__sighandler handler