From: "Mika Penttilä" <mika.penttila@kolumbus•fi>
To: David Woodhouse <dwmw2@infradead•org>
Cc: akpm@osdl•org, linuxppc-dev@ozlabs•org,
linux-kernel@vger•kernel.org, drepper@redhat•com
Subject: Re: [PATCH] 3/3 Generic sys_rt_sigsuspend
Date: Tue, 29 Nov 2005 07:18:03 +0200 [thread overview]
Message-ID: <438BE48B.9060908@kolumbus.fi> (raw)
In-Reply-To: <1133225852.31573.115.camel@baythorne.infradead.org>
David Woodhouse wrote:
>The TIF_RESTORE_SIGMASK flag allows us to have a generic implementation
>of sys_rt_sigsuspend() instead of duplicating it for each architecture.
>This provides such an implementation and makes arch/powerpc use it.
>
>It also tidies up the ppc32 sys_sigsuspend() to use TIF_RESTORE_SIGMASK.
>
>Signed-off-by: David Woodhouse <dwmw2@infradead•org>
>
>
>
>+#ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND
>+long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize)
>+{
>+ sigset_t saveset, newset;
>+
>+ /* XXX: Don't preclude handling different sized sigset_t's. */
>+ if (sigsetsize != sizeof(sigset_t))
>+ return -EINVAL;
>+
>+ if (copy_from_user(&newset, unewset, sizeof(newset)))
>+ return -EFAULT;
>+ sigdelsetmask(&newset, sigmask(SIGKILL)|sigmask(SIGSTOP));
>+
>+ spin_lock_irq(¤t->sighand->siglock);
>+ saveset = current->blocked;
>+ current->blocked = newset;
>+ recalc_sigpending();
>+ spin_unlock_irq(¤t->sighand->siglock);
>+
>+ current->state = TASK_INTERRUPTIBLE;
>+ schedule();
>+ set_thread_flag(TIF_RESTORE_SIGMASK);
>+ return -ERESTARTNOHAND;
>+}
>+#endif /* __ARCH_WANT_SYS_RT_SIGSUSPEND */
>+
>
>
You are not setting saved_sigmask here. And shouldn't it return -EINTR?
Thanks,
Mika
next prev parent reply other threads:[~2005-11-29 5:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1133225007.31573.86.camel@baythorne.infradead.org>
2005-11-29 0:57 ` [PATCH] 1/3 Add pselect/ppoll() system calls David Woodhouse
2005-11-29 0:57 ` [PATCH] 2/3 Add TIF_RESTORE_SIGMASK support for arch/powerpc David Woodhouse
2005-11-29 0:57 ` [PATCH] 3/3 Generic sys_rt_sigsuspend David Woodhouse
2005-11-29 5:18 ` Mika Penttilä [this message]
2005-11-29 10:42 ` David Woodhouse
2005-11-29 15:53 ` Daniel Jacobowitz
2005-11-29 16:09 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=438BE48B.9060908@kolumbus.fi \
--to=mika.penttila@kolumbus$(echo .)fi \
--cc=akpm@osdl$(echo .)org \
--cc=drepper@redhat$(echo .)com \
--cc=dwmw2@infradead$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox