diff options
author | Peter Foley <pefoley2@pefoley.com> | 2014-09-25 14:23:15 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-09-26 05:02:56 -0400 |
commit | 0421fc837c822e86c76884a30a9155e512a5a66a (patch) | |
tree | dbe95a10a0705f5caf3e7b85bcbed2709f663138 /Documentation/prctl/disable-tsc-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-test.c')
-rw-r--r-- | Documentation/prctl/disable-tsc-test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/prctl/disable-tsc-test.c b/Documentation/prctl/disable-tsc-test.c index 843c81eac235..2541e65cb64b 100644 --- a/Documentation/prctl/disable-tsc-test.c +++ b/Documentation/prctl/disable-tsc-test.c | |||
@@ -29,14 +29,15 @@ const char *tsc_names[] = | |||
29 | [PR_TSC_SIGSEGV] = "PR_TSC_SIGSEGV", | 29 | [PR_TSC_SIGSEGV] = "PR_TSC_SIGSEGV", |
30 | }; | 30 | }; |
31 | 31 | ||
32 | uint64_t rdtsc() { | 32 | static uint64_t rdtsc(void) |
33 | { | ||
33 | uint32_t lo, hi; | 34 | uint32_t lo, hi; |
34 | /* We cannot use "=A", since this would use %rax on x86_64 */ | 35 | /* We cannot use "=A", since this would use %rax on x86_64 */ |
35 | __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); | 36 | __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); |
36 | return (uint64_t)hi << 32 | lo; | 37 | return (uint64_t)hi << 32 | lo; |
37 | } | 38 | } |
38 | 39 | ||
39 | void sigsegv_cb(int sig) | 40 | static void sigsegv_cb(int sig) |
40 | { | 41 | { |
41 | int tsc_val = 0; | 42 | int tsc_val = 0; |
42 | 43 | ||