aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-10-11 18:56:32 +0000
committerUlrich Drepper <drepper@redhat.com>2002-10-11 18:56:32 +0000
commitbd97565d089431795f0ee0546a08a0bafd39903a (patch)
treec9a049675aa4bed62b72fb2558e34705c15a77ae /sysdeps/unix/sysv
parent5232c939149fc6ad1af73c7faa52e0d251417f51 (diff)
downloadglibc-bd97565d089431795f0ee0546a08a0bafd39903a.tar
glibc-bd97565d089431795f0ee0546a08a0bafd39903a.tar.gz
glibc-bd97565d089431795f0ee0546a08a0bafd39903a.tar.bz2
glibc-bd97565d089431795f0ee0546a08a0bafd39903a.zip
(profil_counter): Add hack to prevent the compiler from clobbering the signal context.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/i386/profil-counter.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/profil-counter.h b/sysdeps/unix/sysv/linux/i386/profil-counter.h
index 9af0cbbde4..d592a7bd68 100644
--- a/sysdeps/unix/sysv/linux/i386/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/i386/profil-counter.h
@@ -1,5 +1,5 @@
/* Low-level statistical profiling support function. Linux/i386 version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,12 @@
#include <sigcontextinfo.h>
static void
-profil_counter (int signo, SIGCONTEXT scp)
+profil_counter (int signo, const SIGCONTEXT scp)
{
profil_count ((void *) GET_PC (scp));
+
+ /* This is a hack to prevent the compiler from implementing the
+ above function call as a sibcall. The sibcall would overwrite
+ the signal context. */
+ asm volatile ("");
}