lkml.org 
[lkml]   [2011]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 10/28] posix-cpu-timers: Remove the stub nanosleep functions
    CLOCK_THREAD_CPUTIME_ID implements stub functions for nanosleep and
    nanosleep_restart, which return -EINVAL. That return value is
    wrong. The correct return value is -ENOTSUP.

    Remove the stubs and let the new dispatch code return the correct
    error code.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: Richard Cochran <richard.cochran@omicron.at>
    ---
    kernel/posix-cpu-timers.c | 11 -----------
    1 file changed, 11 deletions(-)

    Index: linux-2.6-tip/kernel/posix-cpu-timers.c
    ===================================================================
    --- linux-2.6-tip.orig/kernel/posix-cpu-timers.c
    +++ linux-2.6-tip/kernel/posix-cpu-timers.c
    @@ -1586,15 +1586,6 @@ static int thread_cpu_timer_create(struc
    timer->it_clock = THREAD_CLOCK;
    return posix_cpu_timer_create(timer);
    }
    -static int thread_cpu_nsleep(const clockid_t which_clock, int flags,
    - struct timespec *rqtp, struct timespec __user *rmtp)
    -{
    - return -EINVAL;
    -}
    -static long thread_cpu_nsleep_restart(struct restart_block *restart_block)
    -{
    - return -EINVAL;
    -}

    struct k_clock clock_posix_cpu = {
    .clock_getres = posix_cpu_clock_getres,
    @@ -1623,8 +1614,6 @@ static __init int init_posix_cpu_timers(
    .clock_get = thread_cpu_clock_get,
    .clock_set = do_posix_clock_nosettime,
    .timer_create = thread_cpu_timer_create,
    - .nsleep = thread_cpu_nsleep,
    - .nsleep_restart = thread_cpu_nsleep_restart,
    };
    struct timespec ts;




    \
     
     \ /
      Last update: 2011-02-01 14:56    [W:4.061 / U:0.604 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site