Re: [patch 2/4] Timerfd v3 - new timerfd API

2007-11-27 Thread Davide Libenzi
On Tue, 27 Nov 2007, Andrew Morton wrote: > On Tue, 27 Nov 2007 12:47:46 -0800 (PST) > Davide Libenzi <[EMAIL PROTECTED]> wrote: > > > On Tue, 27 Nov 2007, Andrew Morton wrote: > > > > > On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi <[EMAIL PROTECTED]> > > > wrote: > > > > > > > +static

Re: [patch 2/4] Timerfd v3 - new timerfd API

2007-11-27 Thread Andrew Morton
On Tue, 27 Nov 2007 12:47:46 -0800 (PST) Davide Libenzi <[EMAIL PROTECTED]> wrote: > On Tue, 27 Nov 2007, Andrew Morton wrote: > > > On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi <[EMAIL PROTECTED]> wrote: > > > > > +static struct file *timerfd_fget(int fd) > > > +{ > > > + struct file

Re: [patch 2/4] Timerfd v3 - new timerfd API

2007-11-27 Thread Davide Libenzi
On Tue, 27 Nov 2007, Andrew Morton wrote: > On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi <[EMAIL PROTECTED]> wrote: > > > +static struct file *timerfd_fget(int fd) > > +{ > > + struct file *file; > > + > > + file = fget(fd); > > + if (!file) > > + return ERR_PTR(-EBADF); > >

Re: [patch 2/4] Timerfd v3 - new timerfd API

2007-11-27 Thread Andrew Morton
On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi <[EMAIL PROTECTED]> wrote: > +static struct file *timerfd_fget(int fd) > +{ > + struct file *file; > + > + file = fget(fd); > + if (!file) > + return ERR_PTR(-EBADF); > + if (file->f_op != _fops) { > +

Re: [patch 2/4] Timerfd v3 - new timerfd API

2007-11-27 Thread Andrew Morton
On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi [EMAIL PROTECTED] wrote: +static struct file *timerfd_fget(int fd) +{ + struct file *file; + + file = fget(fd); + if (!file) + return ERR_PTR(-EBADF); + if (file-f_op != timerfd_fops) { +

Re: [patch 2/4] Timerfd v3 - new timerfd API

2007-11-27 Thread Davide Libenzi
On Tue, 27 Nov 2007, Andrew Morton wrote: On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi [EMAIL PROTECTED] wrote: +static struct file *timerfd_fget(int fd) +{ + struct file *file; + + file = fget(fd); + if (!file) + return ERR_PTR(-EBADF); + if (file-f_op

Re: [patch 2/4] Timerfd v3 - new timerfd API

2007-11-27 Thread Andrew Morton
On Tue, 27 Nov 2007 12:47:46 -0800 (PST) Davide Libenzi [EMAIL PROTECTED] wrote: On Tue, 27 Nov 2007, Andrew Morton wrote: On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi [EMAIL PROTECTED] wrote: +static struct file *timerfd_fget(int fd) +{ + struct file *file; + + file =

Re: [patch 2/4] Timerfd v3 - new timerfd API

2007-11-27 Thread Davide Libenzi
On Tue, 27 Nov 2007, Andrew Morton wrote: On Tue, 27 Nov 2007 12:47:46 -0800 (PST) Davide Libenzi [EMAIL PROTECTED] wrote: On Tue, 27 Nov 2007, Andrew Morton wrote: On Sun, 25 Nov 2007 14:14:19 -0800 Davide Libenzi [EMAIL PROTECTED] wrote: +static struct file

[patch 2/4] Timerfd v3 - new timerfd API

2007-11-25 Thread Davide Libenzi
This is the new timerfd API as it is implemented by the following patch: int timerfd_create(int clockid, int flags); int timerfd_settime(int ufd, int flags, const struct itimerspec *utmr, struct itimerspec *otmr); int timerfd_gettime(int ufd, struct

[patch 2/4] Timerfd v3 - new timerfd API

2007-11-25 Thread Davide Libenzi
This is the new timerfd API as it is implemented by the following patch: int timerfd_create(int clockid, int flags); int timerfd_settime(int ufd, int flags, const struct itimerspec *utmr, struct itimerspec *otmr); int timerfd_gettime(int ufd, struct