kernel-ark/arch/mips/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
..
8250-platform.c
asm-offsets.c
binfmt_elfn32.c arch/mips/: Spelling fixes 2008-02-03 16:54:53 +02:00
binfmt_elfo32.c arch/mips/: Spelling fixes 2008-02-03 16:54:53 +02:00
branch.c
cevt-bcm1480.c [MIPS] Sibyte: Stop timers before programming next even. 2007-11-15 23:21:50 +00:00
cevt-gt641xx.c [MIPS] time: set clock before clockevent_delta2ns() in GT641xx. 2007-10-29 19:35:33 +00:00
cevt-r4k.c [MIPS] Handle R4000/R4400 mfc0 from count register. 2007-11-26 17:26:14 +00:00
cevt-sb1250.c [MIPS] Sibyte: Stop timers before programming next even. 2007-11-15 23:21:50 +00:00
cevt-txx9.c [MIPS] txx9tmr clockevent/clocksource driver 2007-10-29 19:35:35 +00:00
cpu-bugs64.c [MIPS] R4000/R4400 errata workarounds 2008-01-29 10:14:54 +00:00
cpu-probe.c [MIPS] Alchemy: Au1210/Au1250 CPU support 2008-01-29 10:14:59 +00:00
csrc-bcm1480.c [MIPS] Sibyte: Split and move clock code. 2007-11-02 16:13:47 +00:00
csrc-r4k.c [MIPS] Fix build. 2007-12-01 00:39:37 +00:00
csrc-sb1250.c [MIPS] Sibyte: Fix name of clocksource. 2007-11-15 23:21:51 +00:00
early_printk.c
entry.S
gdb-low.S
gdb-stub.c [MIPS] Kill num_online_cpus() loops. 2007-10-11 23:46:18 +01:00
genex.S [MIPS] R4000/R4400 daddiu erratum workaround 2008-01-29 10:14:55 +00:00
head.S [MIPS] Fix build after b0rked changes to <linux/init.h>. 2008-02-01 14:48:43 +00:00
i8253.c mips, x86: optimize the i8259 code a bit 2008-01-30 13:30:47 +01:00
i8259.c Driver core: change sysdev classes to use dynamic kobject names 2008-01-24 20:40:40 -08:00
init_task.c
irix5sys.S
irixelf.c pid namespaces: round up the API 2007-10-19 11:53:37 -07:00
irixinv.c
irixioctl.c
irixsig.c mips: undo locking on error path returns 2007-11-14 18:45:42 -08:00
irq_cpu.c [MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts. 2007-11-15 23:21:52 +00:00
irq_txx9.c
irq-gt641xx.c
irq-msc01.c
irq-rm7000.c [MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts. 2007-11-15 23:21:52 +00:00
irq-rm9000.c [MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts. 2007-11-15 23:21:52 +00:00
irq.c [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
kspd.c arch/mips/: Spelling fixes 2008-02-03 16:54:53 +02:00
linux32.c [MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64 2008-01-29 10:15:02 +00:00
machine_kexec.c
Makefile [MIPS] Only build r4k clocksource for systems that work ok with it. 2007-11-26 17:26:14 +00:00
mips_ksyms.c
mips-mt-fpaff.c cpu-hotplug: replace lock_cpu_hotplug() with get_online_cpus() 2008-01-25 21:08:02 +01:00
mips-mt.c [MIPS] SMP: Call platform methods via ops structure. 2008-01-29 10:14:57 +00:00
module.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
proc.c [MIPS]: constify function pointer tables 2008-01-29 10:15:03 +00:00
process.c [MIPS] Ensure that ST0_FR is never set on a 32 bit kernel 2007-12-14 17:34:30 +00:00
ptrace32.c [MIPS] Store sign-extend register values for PTRACE_GETREGS 2007-10-29 19:35:36 +00:00
ptrace.c [MIPS] Store sign-extend register values for PTRACE_GETREGS 2007-10-29 19:35:36 +00:00
r4k_fpu.S
r4k_switch.S
r2300_fpu.S
r2300_switch.S
r6000_fpu.S
relocate_kernel.S
reset.c
rtlx.c [MIPS] Remove duplicate includes. 2008-01-29 10:14:56 +00:00
scall32-o32.S timerfd: new timerfd API 2008-02-05 09:44:07 -08:00
scall64-64.S timerfd: new timerfd API 2008-02-05 09:44:07 -08:00
scall64-n32.S timerfd: new timerfd API 2008-02-05 09:44:07 -08:00
scall64-o32.S timerfd: new timerfd API 2008-02-05 09:44:07 -08:00
semaphore.c
setup.c arch/mips/: Spelling fixes 2008-02-03 16:54:53 +02:00
signal32.c
signal_n32.c
signal-common.h
signal.c [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
smp-mt.c [MIPS] SMP: Call platform methods via ops structure. 2008-01-29 10:14:57 +00:00
smp-up.c [MIPS] Only build r4k clocksource for systems that work ok with it. 2007-11-26 17:26:14 +00:00
smp.c [MIPS] SMP: Call platform methods via ops structure. 2008-01-29 10:14:57 +00:00
smtc-asm.S
smtc-proc.c [MIPS] SMP: Call platform methods via ops structure. 2008-01-29 10:14:57 +00:00
smtc.c arch/mips/: Spelling fixes 2008-02-03 16:54:53 +02:00
stacktrace.c
syscall.c [MIPS] Add len and addr validation for MAP_FIXED mappings. 2007-10-29 19:35:36 +00:00
sysirix.c pid namespaces: round up the API 2007-10-19 11:53:37 -07:00
time.c [MIPS] time: remove unused mips_timer_state() 2008-01-29 10:15:00 +00:00
topology.c
traps.c [MIPS] Ensure that ST0_FR is never set on a 32 bit kernel 2007-12-14 17:34:30 +00:00
unaligned.c
vmlinux.lds.S all archs: consolidate init and exit sections in vmlinux.lds.h 2008-01-28 23:21:17 +01:00
vpe.c [MIPS] Remove duplicate includes. 2008-01-29 10:14:56 +00:00