cpu: add swint()
This commit is contained in:
parent
fbaf9df59f
commit
dc231741b7
@ -284,3 +284,9 @@ void cpuid1(uint * ebx, uint * ecx, uint * edx)
|
||||
{
|
||||
__asm("cpuid", "=*{ebx},=*{ecx},=*{edx},{eax}", ebx, ecx, edx, 1u);
|
||||
}
|
||||
|
||||
void swint(int swint_id)()
|
||||
{
|
||||
static assert((0 <= swint_id) && (swint_id <= 255));
|
||||
mixin(`__asm("int $$`, swint_id, `", "");`);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user