1 /*
2 * Copyright (c) 2017-2021 Dmitry V. Levin <ldv@strace.io>
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7
8 #include "defs.h"
9
10 #include DEF_MPERS_TYPE(struct_rt_sigframe)
11
12 #include "rt_sigframe.h"
13
14 #include MPERS_DEFS
15
16 #ifndef OFFSETOF_SIGMASK_IN_RT_SIGFRAME
17 # define OFFSETOF_SIGMASK_IN_RT_SIGFRAME \
18 offsetof(struct_rt_sigframe, uc.uc_sigmask)
19 #endif
20
21 SYS_FUNC(rt_sigreturn)
22 {
23 const kernel_ulong_t sf_addr = get_rt_sigframe_addr(tcp);
24
25 if (sf_addr) {
26 const kernel_ulong_t sm_addr =
27 sf_addr + OFFSETOF_SIGMASK_IN_RT_SIGFRAME;
28 print_sigset_addr(tcp, sm_addr);
29 }
30
31 return RVAL_DECODED;
32 }