IDT question
Hello everyone i also have one things not understand as follow:
To initialize the IDT, the following function is provided:
setInterruptHandler(int position, void (*handler)(), int privLevel)
The parameters required to write the exception are:
• int position. Entry in the IDT.
• void (*handler)(). Address of the handler that will handle the exception4.
• int privLevel. Privilege level to be accessed. There are two possibilities:
0 to Kernel, 3 to User. Decide the privilege level of the code that generates an exception.
Hope your can help me , how to write this code?
|