Avoid costly 64-bit division in grub_get_time_ms on most platforms.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-03-10 17:45:38 +01:00
parent fc3ff2a2ad
commit 5341c0fbfc
10 changed files with 70 additions and 93 deletions

View file

@ -21,9 +21,4 @@
#include <grub/symbol.h>
#define GRUB_TICKS_PER_SECOND 18
/* Return the real time in ticks. */
grub_uint32_t grub_get_rtc (void);
#endif /* ! KERNEL_MACHINE_TIME_HEADER */

View file

@ -100,6 +100,4 @@ enum
GRUB_PIT_CTRL_COUNT_BCD = 0x01 /* 4-decade BCD counter. */
};
void EXPORT_FUNC(grub_pit_wait) (grub_uint16_t tics);
#endif /* ! KERNEL_CPU_PIT_HEADER */

View file

@ -137,5 +137,7 @@ grub_cpu_is_tsc_supported (void)
void grub_tsc_init (void);
grub_uint64_t grub_tsc_get_time_ms (void);
/* In ms per 2^32 ticks. */
extern grub_uint32_t EXPORT_VAR(grub_tsc_rate);
#endif /* ! KERNEL_CPU_TSC_HEADER */