2009-07-23 08:51:15 Kernel to User Space - Communication
Sheik ibrahim (KUWAIT)
Message: 77955
Hi,
I am in need to send data rapidly from kernel interrupt routine to the userspace .
Can any one suggest me which is the best communication method to send data from kernel to user?
By
Ibrahim
QuoteReplyEditDelete
2009-07-23 10:26:09 Re: Kernel to User Space - Communication
Mike Frysinger (UNITED STATES)
Message: 77965
interrupt routines arent in the business of talking directly to userspace. they process the interrupt and notify another piece of the kernel to wake up and do the processing. your description is pretty generic, so the generic answer is to use a character device driver -- have it register the IRQ, have the write() function use the completion interfaces to have the process sleep, and then once the IRQ has called the completion function, have the write function do the read/transfer to userspace.
the free LDD3 book more than covers all of this:
docs.blackfin.uclinux.org/doku.php?id=references_and_pointers