/
githubmirror
/
ipxe
Обзор
Документация
Войти
/
githubmirror
/
ipxe
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/arch/i386/include/bits/profile.h
28 строк
453 B
Michael Brown
[profile] Standardise return type of profile_timestamp()
24 сен 2024, 17:40
24 сен 2024, 17:40
5f7c6bd
Код
Авторство
О чём код?
#ifndef _BITS_PROFILE_H #define _BITS_PROFILE_H /** @file * * Profiling * */ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include <stdint.h> /** * Get profiling timestamp * * @ret timestamp Timestamp */ static inline __attribute__ (( always_inline )) unsigned long profile_timestamp ( void ) { uint32_t tsc; /* Read timestamp counter */ __asm__ __volatile__ ( "rdtsc" : "=a" ( tsc ) : : "edx" ); return tsc; } #endif /* _BITS_PROFILE_H */