mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
软中断处理机制
This commit is contained in:
@ -393,3 +393,14 @@ ul rdmsr(ul address)
|
||||
: "memory");
|
||||
return ((ul)tmp0 << 32) | tmp1;
|
||||
}
|
||||
|
||||
|
||||
uint64_t get_rflags()
|
||||
{
|
||||
unsigned long tmp = 0;
|
||||
__asm__ __volatile__ ("pushfq \n\t"
|
||||
"movq (%%rsp), %0 \n\t"
|
||||
"popfq \n\t"
|
||||
:"=r"(tmp)::"memory");
|
||||
return tmp;
|
||||
}
|
Reference in New Issue
Block a user