eventfd.c (e7d476dfdf0bcfed478a207aecfdc84f81efecaf) eventfd.c (e38b36f325153eaadd1c2a7abc5762079233e540)
1/*
2 * fs/eventfd.c
3 *
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
5 *
6 */
7
8#include <linux/file.h>

--- 189 unchanged lines hidden (view full) ---

198 return file;
199}
200
201asmlinkage long sys_eventfd2(unsigned int count, int flags)
202{
203 int fd;
204 struct eventfd_ctx *ctx;
205
1/*
2 * fs/eventfd.c
3 *
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
5 *
6 */
7
8#include <linux/file.h>

--- 189 unchanged lines hidden (view full) ---

198 return file;
199}
200
201asmlinkage long sys_eventfd2(unsigned int count, int flags)
202{
203 int fd;
204 struct eventfd_ctx *ctx;
205
206 /* Check the EFD_* constants for consistency. */
207 BUILD_BUG_ON(EFD_CLOEXEC != O_CLOEXEC);
208 BUILD_BUG_ON(EFD_NONBLOCK != O_NONBLOCK);
209
206 if (flags & ~(EFD_CLOEXEC | EFD_NONBLOCK))
207 return -EINVAL;
208
209 ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
210 if (!ctx)
211 return -ENOMEM;
212
213 init_waitqueue_head(&ctx->wqh);

--- 18 unchanged lines hidden ---
210 if (flags & ~(EFD_CLOEXEC | EFD_NONBLOCK))
211 return -EINVAL;
212
213 ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
214 if (!ctx)
215 return -ENOMEM;
216
217 init_waitqueue_head(&ctx->wqh);

--- 18 unchanged lines hidden ---