| 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 | typedef void (*thread_entry_t)(void *arg); |
| 9 | |
| 10 | #define SIGNAL_MAX_N NSIG |
| 11 | typedef int signal_t; |
| 12 | typedef struct |
| 13 | { |
| 14 | __sighandler handler; |
| 15 | unsigned long sa_flags; |
| 16 | void (*sa_restorer)(void); |
| 17 | } sigaction_t; |
| 18 | |
| 19 | MOS_STATIC_ASSERT(sizeof(sigaction_t) == 24, "update sigaction_t struct size" ); |
| 20 | |
| 21 | MOS_STATIC_ASSERT(offsetof(struct sigaction, __sa_handler) == offsetof(sigaction_t, handler), "update sigaction_t struct layout" ); |
| 22 | MOS_STATIC_ASSERT(offsetof(struct sigaction, sa_flags) == offsetof(sigaction_t, sa_flags), "update sigaction_t struct layout" ); |
| 23 | MOS_STATIC_ASSERT(offsetof(struct sigaction, sa_restorer) == offsetof(sigaction_t, sa_restorer), "update sigaction_t struct layout" ); |
| 24 | |