Hello Mao,
Thank you for a very informative article. Can you please show how to call a read from userspace without being blocked forever?
I have tried this by changing the "wait_event_interruptible" to "wait_event_interruptible_timeout". However, the timeout resolution is only in multiples of 10ms (since one jiffie is 10ms on my system). I am looking for a way to be able to wait for a delay in usecs times frame and then timeout. Is there a way we can add poll method for the sysfs attribute file? Right now, poll always immediately returns.
Thanks
Sierrarun
Hello,
I have been able to use hr timers to timeout from wait_event_interruptible call in the resolution of usecs. You can close this issue. Thanks
Sierrarun.
Hello Mao, Thank you for a very informative article. Can you please show how to call a read from userspace without being blocked forever?
I have tried this by changing the "wait_event_interruptible" to "wait_event_interruptible_timeout". However, the timeout resolution is only in multiples of 10ms (since one jiffie is 10ms on my system). I am looking for a way to be able to wait for a delay in usecs times frame and then timeout. Is there a way we can add poll method for the sysfs attribute file? Right now, poll always immediately returns. Thanks Sierrarun