Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
disable-tsc-ctxt-sw-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_expect (int sig)
 
void segvtask (void)
 
void sigsegv_fail (int sig)
 
void rdtsctask (void)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

#define PR_GET_TSC   25

Definition at line 24 of file disable-tsc-ctxt-sw-stress-test.c.

#define PR_SET_TSC   26

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

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

Definition at line 26 of file disable-tsc-ctxt-sw-stress-test.c.

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

Definition at line 27 of file disable-tsc-ctxt-sw-stress-test.c.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 76 of file disable-tsc-ctxt-sw-stress-test.c.

uint64_t rdtsc ( void  )

Definition at line 30 of file disable-tsc-ctxt-sw-stress-test.c.

void rdtsctask ( void  )

Definition at line 63 of file disable-tsc-ctxt-sw-stress-test.c.

void segvtask ( void  )

Definition at line 42 of file disable-tsc-ctxt-sw-stress-test.c.

void sigsegv_expect ( int  sig)

Definition at line 37 of file disable-tsc-ctxt-sw-stress-test.c.

void sigsegv_fail ( int  sig)

Definition at line 57 of file disable-tsc-ctxt-sw-stress-test.c.