summaryrefslogtreecommitdiff
path: root/Documentation/prctl/disable-tsc-on-off-stress-test.c
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2014-09-25 22:23:15 +0400
committerJiri Kosina <jkosina@suse.cz>2014-09-26 13:02:56 +0400
commit0421fc837c822e86c76884a30a9155e512a5a66a (patch)
treedbe95a10a0705f5caf3e7b85bcbed2709f663138 /Documentation/prctl/disable-tsc-on-off-stress-test.c
parentadb19fb66eeebac07fe37d968725bb8906dadb8e (diff)
downloadlinux-0421fc837c822e86c76884a30a9155e512a5a66a.tar.xz
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-on-off-stress-test.c')
-rw-r--r--Documentation/prctl/disable-tsc-on-off-stress-test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/prctl/disable-tsc-on-off-stress-test.c b/Documentation/prctl/disable-tsc-on-off-stress-test.c
index 1fcd91445375..4d83a27627f9 100644
--- a/Documentation/prctl/disable-tsc-on-off-stress-test.c
+++ b/Documentation/prctl/disable-tsc-on-off-stress-test.c
@@ -29,7 +29,8 @@
/* snippet from wikipedia :-) */
-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));
@@ -38,7 +39,7 @@ return (uint64_t)hi << 32 | lo;
int should_segv = 0;
-void sigsegv_cb(int sig)
+static void sigsegv_cb(int sig)
{
if (!should_segv)
{
@@ -55,7 +56,7 @@ void sigsegv_cb(int sig)
rdtsc();
}
-void task(void)
+static void task(void)
{
signal(SIGSEGV, sigsegv_cb);
alarm(10);