On 2023-11-09 01:11, chenpingyuan--- via Devel wrote:
And will interrupts be enabled again automatically after exiting trapping? (Is this done automatically by the CPU? So invisible from the source code.)

That depends on the platform, but usually yes, as the hardware state is
restored to what it was before taking the trap. ARM has ERET and x86 has
IRET to return from interrupts exactly to restore the state. On x86 when
returning from a system call via the sysexit instruction, interrupts do
need to be enabled manually with sti.

Greetings,

Indan
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to