Warning: That file was not part of the compilation database. It may have many parsing errors.

1/* Copyright (C) 2003-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
4
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.
9
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.
14
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/>. */
18
19#include <pthread.h>
20#include <stdio.h>
21#include <stdlib.h>
22#include <unistd.h>
23
24extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer,
25 void (*__routine) (void *),
26 void *__arg);
27extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer,
28 int __execute);
29
30extern void clh (void *arg);
31extern void fn0 (void);
32extern void fn1 (void);
33extern void fn5 (void);
34extern void fn7 (void);
35extern void fn9 (void);
36
37
38static __attribute__((noinline)) void
39fn3 (void)
40{
41 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
42 struct _pthread_cleanup_buffer b;
43 _pthread_cleanup_push (&b, clh, (void *) 4l);
44
45 fn0 ();
46
47 _pthread_cleanup_pop (&b, 1);
48}
49
50
51static __attribute__((noinline)) void
52fn4 (void)
53{
54 pthread_cleanup_push (clh, (void *) 5l);
55
56 fn3 ();
57
58 pthread_cleanup_pop (1);
59}
60
61
62void
63fn5 (void)
64{
65 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
66 struct _pthread_cleanup_buffer b;
67 _pthread_cleanup_push (&b, clh, (void *) 6l);
68
69 fn4 ();
70
71 _pthread_cleanup_pop (&b, 1);
72}
73
74
75static __attribute__((noinline)) void
76fn6 (void)
77{
78 pthread_cleanup_push (clh, (void *) 7l);
79
80 fn0 ();
81
82 pthread_cleanup_pop (1);
83}
84
85
86void
87fn7 (void)
88{
89 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
90 struct _pthread_cleanup_buffer b;
91 _pthread_cleanup_push (&b, clh, (void *) 8l);
92
93 fn6 ();
94
95 _pthread_cleanup_pop (&b, 1);
96}
97
98
99static __attribute__((noinline)) void
100fn8 (void)
101{
102 pthread_cleanup_push (clh, (void *) 9l);
103
104 fn1 ();
105
106 pthread_cleanup_pop (1);
107}
108
109
110void
111fn9 (void)
112{
113 /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */
114 struct _pthread_cleanup_buffer b;
115 _pthread_cleanup_push (&b, clh, (void *) 10l);
116
117 fn8 ();
118
119 _pthread_cleanup_pop (&b, 1);
120}
121

Warning: That file was not part of the compilation database. It may have many parsing errors.