mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
singal: add stack_t define
stack_t used by sigaltstack, make it compile sucess in sim. Signed-off-by: yangyalei <yangyalei@xiaomi.com> ltp: fix compile errors Signed-off-by: yangyalei <yangyalei@xiaomi.com>
This commit is contained in:
parent
9a60d7bb49
commit
fde8affe71
2 changed files with 16 additions and 2 deletions
|
@ -85,7 +85,7 @@ typedef struct
|
|||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
_stack_t interrupt;
|
||||
#endif
|
||||
} stack_t;
|
||||
} crash_stack_t;
|
||||
|
||||
/* Flags to identify what is in the dump */
|
||||
|
||||
|
@ -106,7 +106,7 @@ typedef struct
|
|||
int lineno; /* __LINE__ to up_assert */
|
||||
pid_t pid; /* Process ID */
|
||||
uint32_t regs[XCPTCONTEXT_REGS]; /* Interrupt register save area */
|
||||
stack_t stacks; /* Stack info */
|
||||
crash_stack_t stacks; /* Stack info */
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
char name[CONFIG_TASK_NAME_SIZE + 1]; /* Task name (with NULL
|
||||
* terminator) */
|
||||
|
|
|
@ -220,6 +220,11 @@
|
|||
# define SIGEV_THREAD 3 /* A notification function is called */
|
||||
#endif
|
||||
|
||||
/* sigaltstack stack size */
|
||||
|
||||
#define MINSIGSTKSZ CONFIG_PTHREAD_STACK_MIN /* Smallest signal stack size */
|
||||
#define SIGSTKSZ CONFIG_PTHREAD_STACK_DEFAULT /* Default signal stack size */
|
||||
|
||||
/* Special values of sa_handler used by sigaction and sigset. They are all
|
||||
* treated like NULL for now. This is okay for SIG_DFL and SIG_IGN because
|
||||
* in NuttX, the default action for all signals is to ignore them.
|
||||
|
@ -341,6 +346,15 @@ struct sigaction
|
|||
#define sa_handler sa_u._sa_handler
|
||||
#define sa_sigaction sa_u._sa_sigaction
|
||||
|
||||
/* Structure describing a signal stack. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FAR void *ss_sp;
|
||||
int ss_flags;
|
||||
size_t ss_size;
|
||||
} stack_t;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
|
Loading…
Reference in a new issue