Skip to content

Commit

Permalink
posix-timers: Define nanosleep not supported error separate
Browse files Browse the repository at this point in the history
Define the conditional nanosleep not supported error value outside of
do_posix_clock_nonanosleep(). Preparatory patch for further cleanups. 

Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: John Stultz <[email protected]>
Tested-by: Richard Cochran <[email protected]>
LKML-Reference: <[email protected]>
  • Loading branch information
KAGA-KOKO committed Feb 2, 2011
1 parent 1e6d767 commit 65da528
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions kernel/posix-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 65da528

Please sign in to comment.