So far I wrote a kernel driver that can read pwm encoded signal. I’d like to pass the data to the userspace now and this is what I’m thinking:
User app creates several threads, one of which reads a device file in a loop. I want the read function to efficiently block, putting the thread to sleep until data is available. There will be other devices as well, some serial, thus other threads, but I’d like to use the same mechanism.
So far I wrote a kernel driver that can read pwm encoded signal. I’d like to pass the data to the userspace now and this is what I’m thinking:
User app creates several threads, one of which reads a device file in a loop. I want the read function to efficiently block, putting the thread to sleep until data is available. There will be other devices as well, some serial, thus other threads, but I’d like to use the same mechanism.