timerfd.c (6b1ef0e60d42f2fdaec26baee8327eb156347b4f) | timerfd.c (e38b36f325153eaadd1c2a7abc5762079233e540) |
---|---|
1/* 2 * fs/timerfd.c 3 * 4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org> 5 * 6 * 7 * Thanks to Thomas Gleixner for code reviews and useful comments. 8 * --- 170 unchanged lines hidden (view full) --- 179 return file; 180} 181 182asmlinkage long sys_timerfd_create(int clockid, int flags) 183{ 184 int ufd; 185 struct timerfd_ctx *ctx; 186 | 1/* 2 * fs/timerfd.c 3 * 4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org> 5 * 6 * 7 * Thanks to Thomas Gleixner for code reviews and useful comments. 8 * --- 170 unchanged lines hidden (view full) --- 179 return file; 180} 181 182asmlinkage long sys_timerfd_create(int clockid, int flags) 183{ 184 int ufd; 185 struct timerfd_ctx *ctx; 186 |
187 /* Check the TFD_* constants for consistency. */ 188 BUILD_BUG_ON(TFD_CLOEXEC != O_CLOEXEC); 189 BUILD_BUG_ON(TFD_NONBLOCK != O_NONBLOCK); 190 |
|
187 if (flags & ~(TFD_CLOEXEC | TFD_NONBLOCK)) 188 return -EINVAL; 189 if (clockid != CLOCK_MONOTONIC && 190 clockid != CLOCK_REALTIME) 191 return -EINVAL; 192 193 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); 194 if (!ctx) --- 97 unchanged lines hidden --- | 191 if (flags & ~(TFD_CLOEXEC | TFD_NONBLOCK)) 192 return -EINVAL; 193 if (clockid != CLOCK_MONOTONIC && 194 clockid != CLOCK_REALTIME) 195 return -EINVAL; 196 197 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); 198 if (!ctx) --- 97 unchanged lines hidden --- |