mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
HV: lib: make the argument to udelay unsigned
The parameter to udelay is the microseconds to wait for, which should be an unsigned integer. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
|
||||
#include <hv_lib.h>
|
||||
|
||||
void udelay(int loop_count)
|
||||
void udelay(uint32_t us)
|
||||
{
|
||||
uint64_t dest_tsc, delta_tsc;
|
||||
|
||||
/* Calculate number of ticks to wait */
|
||||
delta_tsc = US_TO_TICKS(loop_count);
|
||||
delta_tsc = US_TO_TICKS(us);
|
||||
dest_tsc = rdtsc() + delta_tsc;
|
||||
|
||||
/* Loop until time expired */
|
||||
|
Reference in New Issue
Block a user