diff options
author | Peter Foley <pefoley2@pefoley.com> | 2014-09-25 11:23:15 -0700 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-09-26 11:02:56 +0200 |
commit | 0421fc837c822e86c76884a30a9155e512a5a66a (patch) | |
tree | dbe95a10a0705f5caf3e7b85bcbed2709f663138 /Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c | |
parent | adb19fb66eeebac07fe37d968725bb8906dadb8e (diff) |
Documentation: make functions static to avoid prototype warnings
Signed-off-by: Peter Foley <pefoley2@pefoley.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c')
-rw-r--r-- | Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c index f8e8e95e81fd..81fdd425ab3e 100644 --- a/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c +++ b/Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c @@ -27,19 +27,20 @@ # define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */ #endif -uint64_t rdtsc() { +static uint64_t rdtsc(void) +{ uint32_t lo, hi; /* We cannot use "=A", since this would use %rax on x86_64 */ __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); return (uint64_t)hi << 32 | lo; } -void sigsegv_expect(int sig) +static void sigsegv_expect(int sig) { /* */ } -void segvtask(void) +static void segvtask(void) { if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) { @@ -54,13 +55,13 @@ void segvtask(void) } -void sigsegv_fail(int sig) +static void sigsegv_fail(int sig) { fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n"); exit(0); } -void rdtsctask(void) +static void rdtsctask(void) { if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) { |