aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/posix-timers.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-01 08:51:01 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-02 09:28:11 -0500
commit65da528d7cc94966cf24d2a1e0837b689159b543 (patch)
treec88d3d5180983872273626de18e8129288e55e21 /kernel/posix-timers.c
parent1e6d767924c74929c0cfe839ae8f37bcee9e544e (diff)
posix-timers: Define nanosleep not supported error separate
Define the conditional nanosleep not supported error value outside of do_posix_clock_nonanosleep(). Preparatory patch for further cleanups. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <johnstul@us.ibm.com> Tested-by: Richard Cochran <richard.cochran@omicron.at> LKML-Reference: <20110201134417.643486574@linutronix.de>
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r--kernel/posix-timers.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 21b7ca205f38..89bff3766d7d 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -81,6 +81,14 @@ static DEFINE_SPINLOCK(idr_lock);
81#error "SIGEV_THREAD_ID must not share bit with other SIGEV values!" 81#error "SIGEV_THREAD_ID must not share bit with other SIGEV values!"
82#endif 82#endif
83 83
84/*
85 * parisc wants ENOTSUP instead of EOPNOTSUPP
86 */
87#ifndef ENOTSUP
88# define ENANOSLEEP_NOTSUP EOPNOTSUPP
89#else
90# define ENANOSLEEP_NOTSUP ENOTSUP
91#endif
84 92
85/* 93/*
86 * The timer ID is turned into a timer address by idr_find(). 94 * The timer ID is turned into a timer address by idr_find().
@@ -937,11 +945,7 @@ EXPORT_SYMBOL_GPL(do_posix_clock_nosettime);
937int do_posix_clock_nonanosleep(const clockid_t clock, int flags, 945int do_posix_clock_nonanosleep(const clockid_t clock, int flags,
938 struct timespec *t, struct timespec __user *r) 946 struct timespec *t, struct timespec __user *r)
939{ 947{
940#ifndef ENOTSUP 948 return -ENANOSLEEP_NOTSUP;
941 return -EOPNOTSUPP; /* aka ENOTSUP in userland for POSIX */
942#else /* parisc does define it separately. */
943 return -ENOTSUP;
944#endif
945} 949}
946EXPORT_SYMBOL_GPL(do_posix_clock_nonanosleep); 950EXPORT_SYMBOL_GPL(do_posix_clock_nonanosleep);
947 951