posix-timers: Define nanosleep not supported error separate
authorThomas Gleixner <tglx@linutronix.de>
Tue, 1 Feb 2011 13:51:01 +0000 (13:51 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 Feb 2011 14:28:11 +0000 (15:28 +0100)
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>

kernel/posix-timers.c

index 21b7ca205f38231992e23c81145c75586b98013e..89bff3766d7d628964ecc5b87680a62b3215b648 100644 (file)
@@ -81,6 +81,14 @@ static DEFINE_SPINLOCK(idr_lock);
 #error "SIGEV_THREAD_ID must not share bit with other SIGEV values!"
 #endif
 
+/*
+ * parisc wants ENOTSUP instead of EOPNOTSUPP
+ */
+#ifndef ENOTSUP
+# define ENANOSLEEP_NOTSUP EOPNOTSUPP
+#else
+# define ENANOSLEEP_NOTSUP ENOTSUP
+#endif
 
 /*
  * The timer ID is turned into a timer address by idr_find().
@@ -937,11 +945,7 @@ EXPORT_SYMBOL_GPL(do_posix_clock_nosettime);
 int do_posix_clock_nonanosleep(const clockid_t clock, int flags,
                               struct timespec *t, struct timespec __user *r)
 {
-#ifndef ENOTSUP
-       return -EOPNOTSUPP;     /* aka ENOTSUP in userland for POSIX */
-#else  /*  parisc does define it separately.  */
-       return -ENOTSUP;
-#endif
+       return -ENANOSLEEP_NOTSUP;
 }
 EXPORT_SYMBOL_GPL(do_posix_clock_nonanosleep);
 
This page took 0.0253 seconds and 5 git commands to generate.