GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GET_CYCLECOUNT(9) FreeBSD Kernel Developer's Manual GET_CYCLECOUNT(9)

get_cyclecount
get the CPU's fast counter register contents

#include <sys/param.h>
#include <sys/systm.h>
#include <machine/cpu.h>

uint64_t
get_cyclecount(void);

The get_cyclecount() function uses a register available in most modern CPUs to return a value that is monotonically increasing inside each CPU.

On SMP systems, there will be a number of separate monotonic sequences, one for each CPU running. The value in the SMP case is selected from one of these sequences, dependent on which CPU was scheduled to service the request.

The speed and the maximum value of each counter is CPU-dependent. Some CPUs (such as the Intel 80486) do not have such a register, so get_cyclecount() on these platforms returns a (monotonic) combination of numbers represented by the structure returned by binuptime(9).

The AMD64 and Intel 64 processors use the TSC register.

binuptime(9)

The get_cyclecount() function first appeared in FreeBSD 5.0.

This manual page was written by Mark Murray <markm@FreeBSD.org>.
March 15, 2011 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 9 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.