Interrupts and Signals in embedded linux
I just started on embedded linux (uclinux).However I am new to Linux, so I need to clarify myself the interrupt & signal usage in driver & application. If any expert or any developer can comment, I would feel great.
Application keeps running some algorithm. Upon an asynchronous event (say gpio event), it should jump to some 'handler', and do some house keeping. (could be changing the IOP/DMA start add etc. Or some control operation).
What I think I understood:-
Interrupt Sub Routines can run only in Kernel context. It has to be initialized from device driver only. An application (right now im not visualizing a thread/process - it has just a main function in a while loop) can be 'notified' only through 2 ways:
1. Reading the file device status. This would be like 'polling or 'not completely asynchronous in terms of the flow'
2. Have some signal sent from within the isr (running in kernel driver) to the user process. That signal should have some handler. That handler would be executed in user process, then moment the signal is triggered. This can be asynchrnous.
Along with any comments or info that you can share, I would also like to know where to find info on 2nd point. A small code which shows how to trigger from ISR and how the signal handler should look, how to initialize signal etc would be great (havent found the right material yet).
Thank you all.
Have a nice day.