Deleted Added
full compact
_pthread_stubs.c (90039) _pthread_stubs.c (103576)
1/*
2 * Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/libc/gen/_pthread_stubs.c 90039 2002-02-01 00:57:29Z obrien $");
28__FBSDID("$FreeBSD: head/lib/libc/gen/_pthread_stubs.c 103576 2002-09-19 01:09:49Z alfred $");
29
30#include <signal.h>
31#include <pthread.h>
32#include <pthread_np.h>
33
34/*
35 * Weak symbols: All libc internal usage of these functions should
36 * use the weak symbol versions (_pthread_XXX). If libpthread is
37 * linked, it will override these functions with (non-weak) routines.
38 * The _pthread_XXX functions are provided solely for internal libc
39 * usage to avoid unwanted cancellation points and to differentiate
40 * between application locks and libc locks (threads holding the
41 * latter can't be allowed to exit/terminate).
42 */
43__weak_reference(_pthread_cond_init_stub, _pthread_cond_init);
44__weak_reference(_pthread_cond_signal_stub, _pthread_cond_signal);
45__weak_reference(_pthread_cond_wait_stub, _pthread_cond_wait);
29
30#include <signal.h>
31#include <pthread.h>
32#include <pthread_np.h>
33
34/*
35 * Weak symbols: All libc internal usage of these functions should
36 * use the weak symbol versions (_pthread_XXX). If libpthread is
37 * linked, it will override these functions with (non-weak) routines.
38 * The _pthread_XXX functions are provided solely for internal libc
39 * usage to avoid unwanted cancellation points and to differentiate
40 * between application locks and libc locks (threads holding the
41 * latter can't be allowed to exit/terminate).
42 */
43__weak_reference(_pthread_cond_init_stub, _pthread_cond_init);
44__weak_reference(_pthread_cond_signal_stub, _pthread_cond_signal);
45__weak_reference(_pthread_cond_wait_stub, _pthread_cond_wait);
46__weak_reference(_pthread_cond_destroy_stub, _pthread_cond_destroy);
46__weak_reference(_pthread_getspecific_stub, _pthread_getspecific);
47__weak_reference(_pthread_key_create_stub, _pthread_key_create);
48__weak_reference(_pthread_key_delete_stub, _pthread_key_delete);
49__weak_reference(_pthread_main_np_stub, _pthread_main_np);
50__weak_reference(_pthread_mutex_destroy_stub, _pthread_mutex_destroy);
51__weak_reference(_pthread_mutex_init_stub, _pthread_mutex_init);
52__weak_reference(_pthread_mutex_lock_stub, _pthread_mutex_lock);
53__weak_reference(_pthread_mutex_trylock_stub, _pthread_mutex_trylock);

--- 32 unchanged lines hidden (view full) ---

86}
87
88int
89_pthread_cond_wait_stub(pthread_cond_t *cond, pthread_mutex_t *mutex)
90{
91 return (0);
92}
93
47__weak_reference(_pthread_getspecific_stub, _pthread_getspecific);
48__weak_reference(_pthread_key_create_stub, _pthread_key_create);
49__weak_reference(_pthread_key_delete_stub, _pthread_key_delete);
50__weak_reference(_pthread_main_np_stub, _pthread_main_np);
51__weak_reference(_pthread_mutex_destroy_stub, _pthread_mutex_destroy);
52__weak_reference(_pthread_mutex_init_stub, _pthread_mutex_init);
53__weak_reference(_pthread_mutex_lock_stub, _pthread_mutex_lock);
54__weak_reference(_pthread_mutex_trylock_stub, _pthread_mutex_trylock);

--- 32 unchanged lines hidden (view full) ---

87}
88
89int
90_pthread_cond_wait_stub(pthread_cond_t *cond, pthread_mutex_t *mutex)
91{
92 return (0);
93}
94
95int
96_pthread_cond_destroy_stub(pthread_cond_t *cond)
97{
98 return (0);
99}
100
94void *
95_pthread_getspecific_stub(pthread_key_t key)
96{
97 return (NULL);
98}
99
100int
101_pthread_key_create_stub(pthread_key_t *key, void (*destructor) (void *))

--- 130 unchanged lines hidden ---
101void *
102_pthread_getspecific_stub(pthread_key_t key)
103{
104 return (NULL);
105}
106
107int
108_pthread_key_create_stub(pthread_key_t *key, void (*destructor) (void *))

--- 130 unchanged lines hidden ---