fork 自 xt-sys/exectos
Implement HlReadTimeStampCounter() routine
此提交包含在:
@@ -313,6 +313,25 @@ HlReadModelSpecificRegister(IN ULONG Register)
|
||||
return Value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the current value of the CPU's time-stamp counter.
|
||||
*
|
||||
* @return This routine returns the current instruction cycle count since the processor was started.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTCDECL
|
||||
ULONGLONG
|
||||
HlReadTimeStampCounter()
|
||||
{
|
||||
ULONGLONG Value;
|
||||
|
||||
asm volatile("rdtsc"
|
||||
: "=A"(Value));
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instructs the processor to set the interrupt flag.
|
||||
*
|
||||
|
||||
新增問題並參考
封鎖使用者