1 /* Copyright (C) 2003-2022 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
19 #include <shlib-compat.h>
24 extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer
*__buffer
,
25 void (*__routine
) (void *),
27 compat_symbol_reference (libpthread
, _pthread_cleanup_push
,
28 _pthread_cleanup_push
, GLIBC_2_0
);
29 extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer
*__buffer
,
31 compat_symbol_reference (libpthread
, _pthread_cleanup_pop
,
32 _pthread_cleanup_pop
, GLIBC_2_0
);
34 extern void clh (void *arg
);
35 extern void fn0 (void);
36 extern void fn1 (void);
37 extern void fn5 (void);
38 extern void fn7 (void);
39 extern void fn9 (void);
42 static __attribute__((noinline
)) void
45 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
46 struct _pthread_cleanup_buffer b
;
47 _pthread_cleanup_push (&b
, clh
, (void *) 4l);
51 _pthread_cleanup_pop (&b
, 1);
55 static __attribute__((noinline
)) void
58 pthread_cleanup_push (clh
, (void *) 5l);
62 pthread_cleanup_pop (1);
69 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
70 struct _pthread_cleanup_buffer b
;
71 _pthread_cleanup_push (&b
, clh
, (void *) 6l);
75 _pthread_cleanup_pop (&b
, 1);
79 static __attribute__((noinline
)) void
82 pthread_cleanup_push (clh
, (void *) 7l);
86 pthread_cleanup_pop (1);
93 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
94 struct _pthread_cleanup_buffer b
;
95 _pthread_cleanup_push (&b
, clh
, (void *) 8l);
99 _pthread_cleanup_pop (&b
, 1);
103 static __attribute__((noinline
)) void
106 pthread_cleanup_push (clh
, (void *) 9l);
110 pthread_cleanup_pop (1);
117 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
118 struct _pthread_cleanup_buffer b
;
119 _pthread_cleanup_push (&b
, clh
, (void *) 10l);
123 _pthread_cleanup_pop (&b
, 1);