Hi. You may know how to detect when a interruption succeeded programming in C. Just like receiving a signal without blocking. Knowing when it was a keystroke (IRQ 2), or a mouse movement (12), or a disk access, etc. and getting actually for example the letter typed.
Working on Linux. But it shouldn't matter. There is not a standard C routine to know when a interruption succeeded? A way to handle signals/events generated from interruptions, for example.
I want to know this to implement a random bit generator. You have to check different sources like the time delaying between keystrokes or maybe the change of the temperature.
I am just asking for an API, like in Unix the system calls are wrapped in C functions. If there isn't something like this, do you know a library to solve it?
I know the existence of /dev/random. I just wanna play with the sources by myself, mixing them, etc. But I just don't how to get that information. I have seen some OpenGL libraries but seems too complicate for something I think should be a basic routine of an OS.
Kernels handle interrupt controllers and manage the handling of interrupt services.
Disk device drivers handle disk interrupts, mouse drivers handle mouse interrupts, keyboard drivers handle keyboard interrupts.
But these are at device driver level.
The idea of a kernel is that it isolates you from machine specifics and provides a logical interface with security and separation from other processes.
If you want to write a user level program you have to work within those limitations.