Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
disable-tsc-test.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <inttypes.h>
#include <sys/prctl.h>
#include <linux/prctl.h>

Go to the source code of this file.

Macros

#define PR_GET_TSC   25
 
#define PR_SET_TSC   26
 
#define PR_TSC_ENABLE   1 /* allow the use of the timestamp counter */
 
#define PR_TSC_SIGSEGV   2 /* throw a SIGSEGV instead of reading the TSC */
 

Functions

uint64_t rdtsc ()
 
void sigsegv_cb (int sig)
 
int main (int argc, char **argv)
 

Variables

const chartsc_names []
 

Macro Definition Documentation

#define PR_GET_TSC   25

Definition at line 19 of file disable-tsc-test.c.

#define PR_SET_TSC   26

Definition at line 20 of file disable-tsc-test.c.

#define PR_TSC_ENABLE   1 /* allow the use of the timestamp counter */

Definition at line 21 of file disable-tsc-test.c.

#define PR_TSC_SIGSEGV   2 /* throw a SIGSEGV instead of reading the TSC */

Definition at line 22 of file disable-tsc-test.c.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 59 of file disable-tsc-test.c.

uint64_t rdtsc ( void  )

Definition at line 32 of file disable-tsc-test.c.

void sigsegv_cb ( int  sig)

Definition at line 39 of file disable-tsc-test.c.

Variable Documentation

const char* tsc_names[]
Initial value:
=
{
[0] = "[not set]",
[PR_TSC_ENABLE] = "PR_TSC_ENABLE",
[PR_TSC_SIGSEGV] = "PR_TSC_SIGSEGV",
}

Definition at line 25 of file disable-tsc-test.c.