1 /* Copyright (C) 2003 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
24 extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer
*__buffer
,
25 void (*__routine
) (void *),
27 extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer
*__buffer
,
30 extern void clh (void *arg
);
31 extern void fn0 (void);
32 extern void fn1 (void);
33 extern void fn5 (void);
34 extern void fn7 (void);
35 extern void fn9 (void);
38 static __attribute__((noinline
)) void
41 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
42 struct _pthread_cleanup_buffer b
;
43 _pthread_cleanup_push (&b
, clh
, (void *) 4l);
47 _pthread_cleanup_pop (&b
, 1);
51 static __attribute__((noinline
)) void
54 pthread_cleanup_push (clh
, (void *) 5l);
58 pthread_cleanup_pop (1);
65 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
66 struct _pthread_cleanup_buffer b
;
67 _pthread_cleanup_push (&b
, clh
, (void *) 6l);
71 _pthread_cleanup_pop (&b
, 1);
75 static __attribute__((noinline
)) void
78 pthread_cleanup_push (clh
, (void *) 7l);
82 pthread_cleanup_pop (1);
89 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
90 struct _pthread_cleanup_buffer b
;
91 _pthread_cleanup_push (&b
, clh
, (void *) 8l);
95 _pthread_cleanup_pop (&b
, 1);
99 static __attribute__((noinline
)) void
102 pthread_cleanup_push (clh
, (void *) 9l);
106 pthread_cleanup_pop (1);
113 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
114 struct _pthread_cleanup_buffer b
;
115 _pthread_cleanup_push (&b
, clh
, (void *) 10l);
119 _pthread_cleanup_pop (&b
, 1);