linux/arch/alpha/kernel
Davide Libenzi 4d672e7ac7 timerfd: new timerfd API
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 itimerspec *otmr);

The timerfd_create() API creates an un-programmed timerfd fd.  The "clockid"
parameter can be either CLOCK_MONOTONIC or CLOCK_REALTIME.

The timerfd_settime() API give new settings by the timerfd fd, by optionally
retrieving the previous expiration time (in case the "otmr" parameter is not
NULL).

The time value specified in "utmr" is absolute, if the TFD_TIMER_ABSTIME bit
is set in the "flags" parameter.  Otherwise it's a relative time.

The timerfd_gettime() API returns the next expiration time of the timer, or
{0, 0} if the timerfd has not been set yet.

Like the previous timerfd API implementation, read(2) and poll(2) are
supported (with the same interface).  Here's a simple test program I used to
exercise the new timerfd APIs:

http://www.xmailserver.org/timerfd-test2.c

[akpm@linux-foundation.org: coding-style cleanups]
[akpm@linux-foundation.org: fix ia64 build]
[akpm@linux-foundation.org: fix m68k build]
[akpm@linux-foundation.org: fix mips build]
[akpm@linux-foundation.org: fix alpha, arm, blackfin, cris, m68k, s390, sparc and sparc64 builds]
[heiko.carstens@de.ibm.com: fix s390]
[akpm@linux-foundation.org: fix powerpc build]
[akpm@linux-foundation.org: fix sparc64 more]
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:07 -08:00
..
alpha_ksyms.c [PATCH] fixing includes in alpha_ksyms.c 2006-10-12 12:25:27 -07:00
asm-offsets.c [PATCH] alpha: Fix getxpid on alpha so it works for threads 2006-02-01 08:53:21 -08:00
console.c ALPHA: support graphics on non-zero PCI domains 2007-06-01 08:18:29 -07:00
core_apecs.c [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
core_cia.c [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
core_irongate.c [PATCH] alpha_ksyms.c cleanup 2006-10-11 11:17:07 -07:00
core_lca.c [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
core_marvel.c ALPHA: support graphics on non-zero PCI domains 2007-06-01 08:18:29 -07:00
core_mcpcia.c alpha: fixes for specific machine types 2007-04-17 16:36:27 -07:00
core_polaris.c [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
core_t2.c [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
core_titan.c ALPHA: support graphics on non-zero PCI domains 2007-06-01 08:18:29 -07:00
core_tsunami.c ALPHA: support graphics on non-zero PCI domains 2007-06-01 08:18:29 -07:00
core_wildfire.c [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
entry.S alpha: convert to generic sys_ptrace 2007-10-16 09:43:03 -07:00
err_common.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
err_ev6.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
err_ev7.c alpha: build fixes 2007-12-17 19:28:16 -08:00
err_impl.h [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
err_marvel.c alpha: build fixes 2007-12-17 19:28:16 -08:00
err_titan.c alpha: build fixes 2007-12-17 19:28:16 -08:00
es1888.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gct.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
head.S deal with alpha section warnings 2007-07-26 11:11:57 -07:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
io.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
irq_alpha.c [PATCH] alpha_ksyms.c cleanup 2006-10-11 11:17:07 -07:00
irq_i8259.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
irq_impl.h [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
irq_pyxis.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
irq_srm.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
irq.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
machvec_impl.h alpha: build fixes 2007-12-17 19:28:16 -08:00
Makefile kbuild: enable 'make CFLAGS=...' to add additional options to CC 2007-10-14 22:21:35 +02:00
module.c some kmalloc/memset ->kzalloc (tree wide) 2007-07-19 10:04:50 -07:00
ns87312.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
osf_sys.c spelling fixes: arch/alpha/ 2007-10-20 01:04:37 +02:00
pci_impl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci_iommu.c alpha: sg_virt() fallout 2007-10-23 12:31:05 +02:00
pci-noop.c alpha: fix sg_page breakage 2007-11-27 09:19:39 +01:00
pci.c deal with alpha section warnings 2007-07-26 11:11:57 -07:00
process.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
proto.h ALPHA: support graphics on non-zero PCI domains 2007-06-01 08:18:29 -07:00
ptrace.c alpha: convert to generic sys_ptrace 2007-10-16 09:43:03 -07:00
semaphore.c Use helpers to obtain task pid in printks (arch code) 2007-10-19 11:53:43 -07:00
setup.c alpha: cleanup in bitops.h 2007-05-30 10:07:54 -07:00
signal.c alpha: support new syscalls 2007-05-30 10:07:54 -07:00
smc37c93x.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
smc37c669.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
smp.c spelling fixes: arch/alpha/ 2007-10-20 01:04:37 +02:00
srm_env.c Update for the srm_env driver. 2006-11-07 23:50:37 +01:00
srmcons.c alpha: fix trivial section mismatch warnings 2007-07-16 09:05:37 -07:00
sys_alcor.c spelling fixes: arch/alpha/ 2007-10-20 01:04:37 +02:00
sys_cabriolet.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
sys_dp264.c ALPHA: support graphics on non-zero PCI domains 2007-06-01 08:18:29 -07:00
sys_eb64p.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
sys_eiger.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
sys_jensen.c [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
sys_marvel.c alpha: fix trivial section mismatch warnings 2007-07-16 09:05:37 -07:00
sys_miata.c [PATCH] alpha: switch to pci_get API 2006-12-07 08:39:26 -08:00
sys_mikasa.c [PATCH] alpha pt_regs cleanups: machine_check() 2006-10-08 12:32:36 -07:00
sys_nautilus.c alpha: more fixes for specific machine types 2007-04-17 16:36:27 -07:00
sys_noritake.c alpha: fixes for specific machine types 2007-04-17 16:36:27 -07:00
sys_rawhide.c alpha: fixes for specific machine types 2007-04-17 16:36:27 -07:00
sys_ruffian.c [PATCH] arch/alpha: Use ARRAY_SIZE macro 2006-07-31 13:28:38 -07:00
sys_rx164.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
sys_sable.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
sys_sio.c spelling fixes: arch/alpha/ 2007-10-20 01:04:37 +02:00
sys_sx164.c alpha: more fixes for specific machine types 2007-04-17 16:36:27 -07:00
sys_takara.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
sys_titan.c alpha: -Werror fixes for sys_titan.c 2007-08-11 15:47:42 -07:00
sys_wildfire.c [PATCH] alpha pt_regs cleanups: handle_irq() 2006-10-08 12:32:35 -07:00
systbls.S timerfd: new timerfd API 2008-02-05 09:44:07 -08:00
time.c alpha: fix trivial section mismatch warnings 2007-07-16 09:05:37 -07:00
traps.c Use helpers to obtain task pid in printks (arch code) 2007-10-19 11:53:43 -07:00
vmlinux.lds.S all archs: consolidate init and exit sections in vmlinux.lds.h 2008-01-28 23:21:17 +01:00