lkml.org 
[lkml]   [2007]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/5] signalfd v4 - signalfd core ...
On Thu, 8 Mar 2007, Davide Libenzi wrote:

> +static ssize_t signalfd_read(struct file *file, char *buf, size_t count,
> + loff_t *ppos)
> +{
> + struct signalfd_ctx *ctx = file->private_data;
> + struct sighand_struct *sighand = ctx->sighand;
> + ssize_t res = 0;
> + int signo = 0;
> + siginfo_t info;
> + DECLARE_WAITQUEUE(wait, current);
> +
> + if (count < sizeof(struct signalfd_siginfo))
> + return -EINVAL;
> + spin_lock_irq(&sighand->siglock);
> + if (unlikely(sighand != ctx->tsk->sighand))
> + goto out_unlock;
> + res = -EAGAIN;
> + if ((signo = dequeue_signal(ctx->tsk, &ctx->sigmask, &info)) != 0 &&

Grrr, never change the code after you tested it. The above is clearly:

if ((signo = dequeue_signal(ctx->tsk, &ctx->sigmask, &info)) == 0 &&
...



- Davide


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-09 03:25    [W:0.042 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site