aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/prctl/disable-tsc-test.c
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2014-09-25 14:23:15 -0400
committerJiri Kosina <jkosina@suse.cz>2014-09-26 05:02:56 -0400
commit0421fc837c822e86c76884a30a9155e512a5a66a (patch)
treedbe95a10a0705f5caf3e7b85bcbed2709f663138 /Documentation/prctl/disable-tsc-test.c
parentadb19fb66eeebac07fe37d968725bb8906dadb8e (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.c5
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
32uint64_t rdtsc() { 32static uint64_t rdtsc(void)
33{
33uint32_t lo, hi; 34uint32_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));
36return (uint64_t)hi << 32 | lo; 37return (uint64_t)hi << 32 | lo;
37} 38}
38 39
39void sigsegv_cb(int sig) 40static void sigsegv_cb(int sig)
40{ 41{
41 int tsc_val = 0; 42 int tsc_val = 0;
42 43