I need to implement asynchronous read/write support in my linux device driver. The user space program should get a asynchronous signal from device driver, indicating that the driver has data and the user space program can read it. Below are the options i found by googling and from LDD book.
[1] Implement poll-read. The driver returns status of read/write queue. The user space program can then decide whether to perform read/write on the device.
[2] Implement async notifications. The device driver is able to send a signal to user space when data is ready on driver side. The user space program can then read the data.
However i have seen developers using select_read call with tty driver. Not sure what support should be added to my existing device driver for using select_read from user space.
Need your advice on the most efficient methods from the above.
select()instruct file_operations{}, so what & why do you think you have to implement more than the fops? - sawdust