aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/compat.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-25 13:32:58 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 15:09:19 -0500
commit322a56cb1fcbe228eee5cdb8a9c6df9f797d998c (patch)
treefeedbad82fdfacf9f4d5ddd343905f6057a71fee /kernel/compat.c
parentad4b65a434bdd2ff37d095ab1ccd836203e985ba (diff)
generic compat_sys_rt_sigprocmask()
conditional on GENERIC_COMPAT_RT_SIGPROCMASK; by the end of that series it will become the same thing as COMPAT and conditional will die out. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/compat.c')
-rw-r--r--kernel/compat.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/compat.c b/kernel/compat.c
index 0c07d435254f..e2a9c4785988 100644
--- a/kernel/compat.c
+++ b/kernel/compat.c
@@ -971,7 +971,7 @@ long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
971} 971}
972 972
973void 973void
974sigset_from_compat (sigset_t *set, compat_sigset_t *compat) 974sigset_from_compat(sigset_t *set, const compat_sigset_t *compat)
975{ 975{
976 switch (_NSIG_WORDS) { 976 switch (_NSIG_WORDS) {
977 case 4: set->sig[3] = compat->sig[6] | (((long)compat->sig[7]) << 32 ); 977 case 4: set->sig[3] = compat->sig[6] | (((long)compat->sig[7]) << 32 );
@@ -982,6 +982,17 @@ sigset_from_compat (sigset_t *set, compat_sigset_t *compat)
982} 982}
983EXPORT_SYMBOL_GPL(sigset_from_compat); 983EXPORT_SYMBOL_GPL(sigset_from_compat);
984 984
985void
986sigset_to_compat(compat_sigset_t *compat, const sigset_t *set)
987{
988 switch (_NSIG_WORDS) {
989 case 4: compat->sig[7] = (set->sig[3] >> 32); compat->sig[6] = set->sig[3];
990 case 3: compat->sig[5] = (set->sig[2] >> 32); compat->sig[4] = set->sig[2];
991 case 2: compat->sig[3] = (set->sig[1] >> 32); compat->sig[2] = set->sig[1];
992 case 1: compat->sig[1] = (set->sig[0] >> 32); compat->sig[0] = set->sig[0];
993 }
994}
995
985asmlinkage long 996asmlinkage long
986compat_sys_rt_sigtimedwait (compat_sigset_t __user *uthese, 997compat_sys_rt_sigtimedwait (compat_sigset_t __user *uthese,
987 struct compat_siginfo __user *uinfo, 998 struct compat_siginfo __user *uinfo,