Skip to content

Commit

Permalink
[PATCH] x86-64: Prevent gcc 4 from optimizing away vsyscalls
Browse files Browse the repository at this point in the history
They were previously static.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Sep 12, 2005
1 parent c1a71a1 commit 2e8ad43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/x86_64/kernel/vsyscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static force_inline long time_syscall(long *t)
return secs;
}

static int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz)
int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz)
{
if (unlikely(!__sysctl_vsyscall))
return gettimeofday(tv,tz);
Expand All @@ -120,7 +120,7 @@ static int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz

/* This will break when the xtime seconds get inaccurate, but that is
* unlikely */
static time_t __vsyscall(1) vtime(time_t *t)
time_t __vsyscall(1) vtime(time_t *t)
{
if (unlikely(!__sysctl_vsyscall))
return time_syscall(t);
Expand All @@ -129,12 +129,12 @@ static time_t __vsyscall(1) vtime(time_t *t)
return __xtime.tv_sec;
}

static long __vsyscall(2) venosys_0(void)
long __vsyscall(2) venosys_0(void)
{
return -ENOSYS;
}

static long __vsyscall(3) venosys_1(void)
long __vsyscall(3) venosys_1(void)
{
return -ENOSYS;
}
Expand Down

0 comments on commit 2e8ad43

Please sign in to comment.