|
From: KJK::Hyperion <hac...@re...> - 2005-02-03 00:54:20
|
At 23.48 02/02/2005, Nicholas Nethercote wrote:
>So the pertinent question is this: how does control return to the client
>in user-space?
an interrupt almost invariably translates into a signal raised to the
calling thread. Interrupts were designed with that use in mind (or, most
probably, signals and exceptions were designed with interrupts in mind...).
A really small subset (in Linux, only # 0x80) is actually an abuse and is
used in place of call far <segment>:0 ("call gate" - IIRC, in AT&T syntax
it's lcall <segment>, 0), an abuse probably justified by raw performance
figures (I read somewhere Windows 95 used an invalid opcode, because at the
time the invalid opcode trap was the fastest way to get into kernel mode.
Nowadays we have sysenter)
>Another question: how do we know what the kernel does while servicing the
>interrupt?
you make an educated guess. In most cases, though, it only results in a
signal and the question really is which signal number for a given interrupt
|