2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 05:18:00 +00:00
criu/include/sigframe.h
Alexander Kartashov 91504f5282 include/restorer.h: moved machine-independent sigframe structs to the file include/sigframe.h.
Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-01-09 17:33:59 +04:00

39 lines
863 B
C

#ifndef __CR_SIGFRAME_H__
#define __CR_SIGFRAME_H__
// Generic sigframe bits
#ifndef __ARCH_SI_PREAMBLE_SIZE
#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
#endif
#define SI_MAX_SIZE 128
#ifndef SI_PAD_SIZE
#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
#endif
typedef struct rt_siginfo {
int si_signo;
int si_errno;
int si_code;
int _pad[SI_PAD_SIZE];
} rt_siginfo_t;
typedef struct rt_sigaltstack {
void *ss_sp;
int ss_flags;
size_t ss_size;
} rt_stack_t;
struct rt_ucontext {
unsigned long uc_flags;
struct rt_ucontext *uc_link;
rt_stack_t uc_stack;
struct rt_sigcontext uc_mcontext;
rt_sigset_t uc_sigmask; /* mask last for extensibility */
int __unused[32 - (sizeof (rt_sigset_t) / sizeof (int))];
unsigned long uc_regspace[128] __attribute__((__aligned__(8)));
};
#endif