Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
disable-tsc-on-off-stress-test.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <inttypes.h>
#include <wait.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)
 
void task (void)
 
int main (int argc, char **argv)
 

Variables

int should_segv = 0
 

Macro Definition Documentation

#define PR_GET_TSC   25

Definition at line 24 of file disable-tsc-on-off-stress-test.c.

#define PR_SET_TSC   26

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

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

Definition at line 26 of file disable-tsc-on-off-stress-test.c.

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

Definition at line 27 of file disable-tsc-on-off-stress-test.c.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 80 of file disable-tsc-on-off-stress-test.c.

uint64_t rdtsc ( void  )

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

void sigsegv_cb ( int  sig)

Definition at line 41 of file disable-tsc-on-off-stress-test.c.

void task ( void  )

Definition at line 58 of file disable-tsc-on-off-stress-test.c.

Variable Documentation

int should_segv = 0

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