mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 21:40:12 +00:00
(profil_counter): Add hack to prevent the compiler from clobbering the signal context.
This commit is contained in:
parent
5232c93914
commit
bd97565d08
@ -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 ("");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user