Deleted Added
full compact
_pthread_stubs.c (71579) _pthread_stubs.c (72373)
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 *
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 * $FreeBSD: head/lib/libc/gen/_pthread_stubs.c 71579 2001-01-24 13:01:12Z deischen $
26 * $FreeBSD: head/lib/libc/gen/_pthread_stubs.c 72373 2001-02-11 22:06:43Z deischen $
27 */
28
29#include <pthread.h>
30
31/*
32 * Weak symbols: All libc internal usage of these functions should
33 * use the weak symbol versions (_pthread_XXX). If libpthread is
34 * linked, it will override these functions with (non-weak) routines.

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

44#pragma weak _pthread_mutex_init=_pthread_mutex_init_stub
45#pragma weak _pthread_mutex_lock=_pthread_mutex_lock_stub
46#pragma weak _pthread_mutex_trylock=_pthread_mutex_trylock_stub
47#pragma weak _pthread_mutex_unlock=_pthread_mutex_unlock_stub
48#pragma weak _pthread_mutexattr_init=_pthread_mutexattr_init_stub
49#pragma weak _pthread_mutexattr_destroy=_pthread_mutexattr_destroy_stub
50#pragma weak _pthread_mutexattr_settype=_pthread_mutexattr_settype_stub
51#pragma weak _pthread_once=_pthread_once_stub
27 */
28
29#include <pthread.h>
30
31/*
32 * Weak symbols: All libc internal usage of these functions should
33 * use the weak symbol versions (_pthread_XXX). If libpthread is
34 * linked, it will override these functions with (non-weak) routines.

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

44#pragma weak _pthread_mutex_init=_pthread_mutex_init_stub
45#pragma weak _pthread_mutex_lock=_pthread_mutex_lock_stub
46#pragma weak _pthread_mutex_trylock=_pthread_mutex_trylock_stub
47#pragma weak _pthread_mutex_unlock=_pthread_mutex_unlock_stub
48#pragma weak _pthread_mutexattr_init=_pthread_mutexattr_init_stub
49#pragma weak _pthread_mutexattr_destroy=_pthread_mutexattr_destroy_stub
50#pragma weak _pthread_mutexattr_settype=_pthread_mutexattr_settype_stub
51#pragma weak _pthread_once=_pthread_once_stub
52#pragma weak _pthread_self=_pthread_self_stub
52#pragma weak _pthread_setspecific=_pthread_setspecific_stub
53
53#pragma weak _pthread_setspecific=_pthread_setspecific_stub
54
55struct pthread {
56};
54
57
58static struct pthread main_thread;
59
60
55void *
56_pthread_getspecific_stub(pthread_key_t key)
57{
58 return (NULL);
59}
60
61int
62_pthread_key_create_stub(pthread_key_t *key, void (*destructor) (void *))

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

119}
120
121int
122_pthread_once_stub(pthread_once_t *once_control, void (*init_routine) (void))
123{
124 return (0);
125}
126
61void *
62_pthread_getspecific_stub(pthread_key_t key)
63{
64 return (NULL);
65}
66
67int
68_pthread_key_create_stub(pthread_key_t *key, void (*destructor) (void *))

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

125}
126
127int
128_pthread_once_stub(pthread_once_t *once_control, void (*init_routine) (void))
129{
130 return (0);
131}
132
133pthread_t
134_pthread_self_stub(void)
135{
136 return (&main_thread);
137}
138
127int
128_pthread_setspecific_stub(pthread_key_t key, const void *value)
129{
130 return (0);
131}
139int
140_pthread_setspecific_stub(pthread_key_t key, const void *value)
141{
142 return (0);
143}