From a2b0ff98a0d44259cc5f6bd7d3a3676ae9f8996a Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 23 Dec 2024 05:11:58 +0800 Subject: 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 Reviewed-by: Sam James --- malloc/tst-malloc-thread-exit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'malloc/tst-malloc-thread-exit.c') diff --git a/malloc/tst-malloc-thread-exit.c b/malloc/tst-malloc-thread-exit.c index aec3897087..269abcea8c 100644 --- a/malloc/tst-malloc-thread-exit.c +++ b/malloc/tst-malloc-thread-exit.c @@ -42,7 +42,7 @@ static int inner_thread_count = 4; static size_t malloc_size = 32; static void -__attribute__ ((noinline, noclone)) +__attribute_optimization_barrier__ unoptimized_free (void *ptr) { free (ptr); -- cgit v1.2.3