wait_event_interruptible_timeout() occasionally returns -512 - Linux

This is a discussion on wait_event_interruptible_timeout() occasionally returns -512 - Linux ; My driver calls wait_event_interruptible_timeout() inside the read() service when it needs to wait for additional data to arrive. The call usually succeeds and is resumed via the isr. On occasion the call fails with a return value of -512, but ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: wait_event_interruptible_timeout() occasionally returns -512

  1. wait_event_interruptible_timeout() occasionally returns -512

    My driver calls wait_event_interruptible_timeout() inside the read()
    service when it needs to wait for additional data to arrive. The
    call usually succeeds and is resumed via the isr. On occasion
    the call fails with a return value of -512, but why?

    The host has an Intel P4 running at 3.2 GHz with 2GB of ram.
    Hyperthreading is enabled and configured into the kernel.
    The kernel includes smp and firewire support.
    The uname output is 2.6.9-firewire.
    The distribution is Red Hat Enterprise Linux Workstation release 4 update 1.

    I've been using this driver for several years and have not seen
    this problem with the 2.2 or 2.4 kernels, nor with any of several
    other 2.6 releases.

    Any help would be greatly appreciated.



  2. Re: wait_event_interruptible_timeout() occasionally returns -512

    dnewbold wrote:
    > My driver calls wait_event_interruptible_timeout() inside the read()
    > service when it needs to wait for additional data to arrive. The
    > call usually succeeds and is resumed via the isr. On occasion
    > the call fails with a return value of -512, but why?


    -ERESTARTSYS See #define __wait_event_interruptible_timeout
    in include/linux/wait.h in the kernel source tree. You'll probably
    have to dig further to get the underlying cause (prepare_to_wait() in
    kernel/wait.c).

    Steve


+ Reply to Thread