Commit 5f5306ed authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

crtools: remove declaration of rt_sigset_t

Actually rt_sigset_t and k_rtsigset_t are the same
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c776580d
...@@ -77,23 +77,12 @@ typedef signed char s8; ...@@ -77,23 +77,12 @@ typedef signed char s8;
#define _LINUX_CAPABILITY_U32S_3 2 #define _LINUX_CAPABILITY_U32S_3 2
typedef struct {
unsigned long sig[2];
} rt_sigset_t;
typedef void rt_signalfn_t(int, siginfo_t *, void *); typedef void rt_signalfn_t(int, siginfo_t *, void *);
typedef rt_signalfn_t *rt_sighandler_t; typedef rt_signalfn_t *rt_sighandler_t;
typedef void rt_restorefn_t(void); typedef void rt_restorefn_t(void);
typedef rt_restorefn_t *rt_sigrestore_t; typedef rt_restorefn_t *rt_sigrestore_t;
typedef struct {
rt_sighandler_t rt_sa_handler;
unsigned long rt_sa_flags;
rt_sigrestore_t rt_sa_restorer;
rt_sigset_t rt_sa_mask;
} rt_sigaction_t;
#define _KNSIG 64 #define _KNSIG 64
#define _NSIG_BPW 32 #define _NSIG_BPW 32
...@@ -110,6 +99,12 @@ static inline void ksigfillset(k_rtsigset_t *set) ...@@ -110,6 +99,12 @@ static inline void ksigfillset(k_rtsigset_t *set)
set->sig[i] = (unsigned long)-1; set->sig[i] = (unsigned long)-1;
} }
typedef struct {
rt_sighandler_t rt_sa_handler;
unsigned long rt_sa_flags;
rt_sigrestore_t rt_sa_restorer;
k_rtsigset_t rt_sa_mask;
} rt_sigaction_t;
/* /*
* Copied from the Linux kernel header arch/arm/include/asm/ptrace.h * Copied from the Linux kernel header arch/arm/include/asm/ptrace.h
......
...@@ -86,23 +86,12 @@ typedef signed char s8; ...@@ -86,23 +86,12 @@ typedef signed char s8;
#define _LINUX_CAPABILITY_VERSION_3 0x20080522 #define _LINUX_CAPABILITY_VERSION_3 0x20080522
#define _LINUX_CAPABILITY_U32S_3 2 #define _LINUX_CAPABILITY_U32S_3 2
typedef struct {
unsigned long sig[1];
} rt_sigset_t;
typedef void rt_signalfn_t(int, siginfo_t *, void *); typedef void rt_signalfn_t(int, siginfo_t *, void *);
typedef rt_signalfn_t *rt_sighandler_t; typedef rt_signalfn_t *rt_sighandler_t;
typedef void rt_restorefn_t(void); typedef void rt_restorefn_t(void);
typedef rt_restorefn_t *rt_sigrestore_t; typedef rt_restorefn_t *rt_sigrestore_t;
typedef struct {
rt_sighandler_t rt_sa_handler;
unsigned long rt_sa_flags;
rt_sigrestore_t rt_sa_restorer;
rt_sigset_t rt_sa_mask;
} rt_sigaction_t;
#define _KNSIG 64 #define _KNSIG 64
# define _NSIG_BPW 64 # define _NSIG_BPW 64
...@@ -119,6 +108,13 @@ static inline void ksigfillset(k_rtsigset_t *set) ...@@ -119,6 +108,13 @@ static inline void ksigfillset(k_rtsigset_t *set)
set->sig[i] = (unsigned long)-1; set->sig[i] = (unsigned long)-1;
} }
typedef struct {
rt_sighandler_t rt_sa_handler;
unsigned long rt_sa_flags;
rt_sigrestore_t rt_sa_restorer;
k_rtsigset_t rt_sa_mask;
} rt_sigaction_t;
typedef struct { typedef struct {
unsigned int entry_number; unsigned int entry_number;
unsigned int base_addr; unsigned int base_addr;
......
...@@ -559,7 +559,7 @@ static int prepare_sigactions(int pid) ...@@ -559,7 +559,7 @@ static int prepare_sigactions(int pid)
* A pure syscall is used, because glibc * A pure syscall is used, because glibc
* sigaction overwrites se_restorer. * sigaction overwrites se_restorer.
*/ */
ret = sys_sigaction(sig, &act, &oact, sizeof(rt_sigset_t)); ret = sys_sigaction(sig, &act, &oact, sizeof(k_rtsigset_t));
if (ret == -1) { if (ret == -1) {
pr_err("%d: Can't restore sigaction: %m\n", pid); pr_err("%d: Can't restore sigaction: %m\n", pid);
goto err; goto err;
......
...@@ -30,8 +30,8 @@ struct rt_ucontext { ...@@ -30,8 +30,8 @@ struct rt_ucontext {
struct rt_ucontext *uc_link; struct rt_ucontext *uc_link;
rt_stack_t uc_stack; rt_stack_t uc_stack;
struct rt_sigcontext uc_mcontext; struct rt_sigcontext uc_mcontext;
rt_sigset_t uc_sigmask; /* mask last for extensibility */ k_rtsigset_t uc_sigmask; /* mask last for extensibility */
int __unused[32 - (sizeof (rt_sigset_t) / sizeof (int))]; int __unused[32 - (sizeof (k_rtsigset_t) / sizeof (int))];
unsigned long uc_regspace[128] __attribute__((__aligned__(8))); unsigned long uc_regspace[128] __attribute__((__aligned__(8)));
}; };
......
...@@ -64,7 +64,7 @@ static int dump_sigact(struct parasite_dump_sa_args *da) ...@@ -64,7 +64,7 @@ static int dump_sigact(struct parasite_dump_sa_args *da)
if (sig == SIGKILL || sig == SIGSTOP) if (sig == SIGKILL || sig == SIGSTOP)
continue; continue;
ret = sys_sigaction(sig, NULL, &da->sas[i], sizeof(rt_sigset_t)); ret = sys_sigaction(sig, NULL, &da->sas[i], sizeof(k_rtsigset_t));
if (ret < 0) { if (ret < 0) {
pr_err("sys_sigaction failed\n"); pr_err("sys_sigaction failed\n");
break; break;
......
...@@ -398,9 +398,9 @@ long __export_restore_task(struct task_restore_core_args *args) ...@@ -398,9 +398,9 @@ long __export_restore_task(struct task_restore_core_args *args)
rt_sigaction_t act; rt_sigaction_t act;
task_entries = args->task_entries; task_entries = args->task_entries;
sys_sigaction(SIGCHLD, NULL, &act, sizeof(rt_sigset_t)); sys_sigaction(SIGCHLD, NULL, &act, sizeof(k_rtsigset_t));
act.rt_sa_handler = sigchld_handler; act.rt_sa_handler = sigchld_handler;
sys_sigaction(SIGCHLD, &act, NULL, sizeof(rt_sigset_t)); sys_sigaction(SIGCHLD, &act, NULL, sizeof(k_rtsigset_t));
log_set_fd(args->logfd); log_set_fd(args->logfd);
log_set_loglevel(args->loglevel); log_set_loglevel(args->loglevel);
...@@ -692,7 +692,7 @@ long __export_restore_task(struct task_restore_core_args *args) ...@@ -692,7 +692,7 @@ long __export_restore_task(struct task_restore_core_args *args)
restore_finish_stage(CR_STATE_RESTORE); restore_finish_stage(CR_STATE_RESTORE);
sys_sigaction(SIGCHLD, &args->sigchld_act, NULL, sizeof(rt_sigset_t)); sys_sigaction(SIGCHLD, &args->sigchld_act, NULL, sizeof(k_rtsigset_t));
futex_set_and_wake(&thread_inprogress, args->nr_threads); futex_set_and_wake(&thread_inprogress, args->nr_threads);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment