diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-12-23 05:11:58 +0800 |
|---|---|---|
| committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-23 06:28:55 +0800 |
| commit | a2b0ff98a0d44259cc5f6bd7d3a3676ae9f8996a (patch) | |
| tree | 7816983cdeea6e6c32dd005c76da785811ea3047 /stdlib/tst-setcontext10.c | |
| parent | 3fb895ac88e99201573352b1abc18db4340ecede (diff) | |
| download | glibc-a2b0ff98a0d44259cc5f6bd7d3a3676ae9f8996a.tar.xz glibc-a2b0ff98a0d44259cc5f6bd7d3a3676ae9f8996a.zip | |
include/sys/cdefs.h: Add __attribute_optimization_barrier__
Add __attribute_optimization_barrier__ to disable inlining and cloning on a
function. For Clang, expand it to
__attribute__ ((optnone))
Otherwise, expand it to
__attribute__ ((noinline, clone))
Co-Authored-By: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'stdlib/tst-setcontext10.c')
| -rw-r--r-- | stdlib/tst-setcontext10.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stdlib/tst-setcontext10.c b/stdlib/tst-setcontext10.c index 7267f5efe3..4991d87ebb 100644 --- a/stdlib/tst-setcontext10.c +++ b/stdlib/tst-setcontext10.c @@ -37,7 +37,7 @@ static ucontext_t ctx; static void f2 (void); static void -__attribute__ ((noinline, noclone)) +__attribute_optimization_barrier__ f1 (void) { printf ("start f1\n"); @@ -45,7 +45,7 @@ f1 (void) } static void -__attribute__ ((noinline, noclone)) +__attribute_optimization_barrier__ f2 (void) { printf ("start f2\n"); @@ -64,7 +64,7 @@ f3 (void) } static int -__attribute__ ((noinline, noclone)) +__attribute_optimization_barrier__ do_test_1 (void) { char st1[32768]; |
