rtld_lock.c (115396) | rtld_lock.c (131575) |
---|---|
1/*- 2 * Copyright 1999, 2000 John D. Polstra. 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 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * 25 * from: FreeBSD: src/libexec/rtld-elf/sparc64/lockdflt.c,v 1.3 2002/10/09 | 1/*- 2 * Copyright 1999, 2000 John D. Polstra. 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 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * 25 * from: FreeBSD: src/libexec/rtld-elf/sparc64/lockdflt.c,v 1.3 2002/10/09 |
26 * $FreeBSD: head/libexec/rtld-elf/rtld_lock.c 115396 2003-05-29 22:58:26Z kan $ | 26 * $FreeBSD: head/libexec/rtld-elf/rtld_lock.c 131575 2004-07-04 16:11:03Z stefanf $ |
27 */ 28 29/* 30 * Thread locking implementation for the dynamic linker. 31 * 32 * We use the "simple, non-scalable reader-preference lock" from: 33 * 34 * J. M. Mellor-Crummey and M. L. Scott. "Scalable Reader-Writer --- 129 unchanged lines hidden (view full) --- 164} 165 166/* 167 * Public interface exposed to the rest of the dynamic linker. 168 */ 169static struct RtldLockInfo lockinfo; 170static struct RtldLockInfo deflockinfo; 171 | 27 */ 28 29/* 30 * Thread locking implementation for the dynamic linker. 31 * 32 * We use the "simple, non-scalable reader-preference lock" from: 33 * 34 * J. M. Mellor-Crummey and M. L. Scott. "Scalable Reader-Writer --- 129 unchanged lines hidden (view full) --- 164} 165 166/* 167 * Public interface exposed to the rest of the dynamic linker. 168 */ 169static struct RtldLockInfo lockinfo; 170static struct RtldLockInfo deflockinfo; 171 |
172static __inline__ int | 172static __inline int |
173thread_mask_set(int mask) 174{ 175 return lockinfo.thread_set_flag(mask); 176} 177 | 173thread_mask_set(int mask) 174{ 175 return lockinfo.thread_set_flag(mask); 176} 177 |
178static __inline__ void | 178static __inline void |
179thread_mask_clear(int mask) 180{ 181 lockinfo.thread_clr_flag(mask); 182} 183 184#define RTLD_LOCK_CNT 2 185struct rtld_lock { 186 void *handle; --- 150 unchanged lines hidden --- | 179thread_mask_clear(int mask) 180{ 181 lockinfo.thread_clr_flag(mask); 182} 183 184#define RTLD_LOCK_CNT 2 185struct rtld_lock { 186 void *handle; --- 150 unchanged lines hidden --- |