]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Library/BaseLib/Ia32/ReadTsc.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadTsc.c
... / ...
CommitLineData
1/** @file\r
2 AsmReadTsc function\r
3\r
4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9\r
10\r
11\r
12/**\r
13 Reads the current value of Time Stamp Counter (TSC).\r
14\r
15 Reads and returns the current value of TSC. This function is only available\r
16 on IA-32 and x64.\r
17\r
18 @return The current value of TSC\r
19\r
20**/\r
21UINT64\r
22EFIAPI\r
23AsmReadTsc (\r
24 VOID\r
25 )\r
26{\r
27 _asm {\r
28 rdtsc\r
29 }\r
30}\r
31\r