Deleted Added
full compact
thr_private.h (213161) thr_private.h (213241)
1/*
2 * Copyright (C) 2005 Daniel M. Eischen <deischen@freebsd.org>
3 * Copyright (c) 2005 David Xu <davidxu@freebsd.org>
4 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>.
5 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
1/*
2 * Copyright (C) 2005 Daniel M. Eischen <deischen@freebsd.org>
3 * Copyright (c) 2005 David Xu <davidxu@freebsd.org>
4 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>.
5 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * $FreeBSD: head/lib/libthr/thread/thr_private.h 213161 2010-09-25 08:36:46Z davidxu $
29 * $FreeBSD: head/lib/libthr/thread/thr_private.h 213241 2010-09-28 04:57:56Z davidxu $
30 */
31
32#ifndef _THR_PRIVATE_H
33#define _THR_PRIVATE_H
34
35/*
36 * Include files.
37 */

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

120 (dst)->tv_sec = (src)->tv_sec - (val)->tv_sec; \
121 (dst)->tv_nsec = (src)->tv_nsec - (val)->tv_nsec; \
122 if ((dst)->tv_nsec < 0) { \
123 (dst)->tv_sec--; \
124 (dst)->tv_nsec += 1000000000; \
125 } \
126 } while (0)
127
30 */
31
32#ifndef _THR_PRIVATE_H
33#define _THR_PRIVATE_H
34
35/*
36 * Include files.
37 */

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

120 (dst)->tv_sec = (src)->tv_sec - (val)->tv_sec; \
121 (dst)->tv_nsec = (src)->tv_nsec - (val)->tv_nsec; \
122 if ((dst)->tv_nsec < 0) { \
123 (dst)->tv_sec--; \
124 (dst)->tv_nsec += 1000000000; \
125 } \
126 } while (0)
127
128/* XXX These values should be same as those defined in pthread.h */
129#define THR_MUTEX_INITIALIZER ((struct pthread_mutex *)NULL)
130#define THR_ADAPTIVE_MUTEX_INITIALIZER ((struct pthread_mutex *)1)
131#define THR_MUTEX_DESTROYED ((struct pthread_mutex *)2)
132#define THR_COND_INITIALIZER ((struct pthread_cond *)NULL)
133#define THR_COND_DESTROYED ((struct pthread_cond *)1)
134#define THR_RWLOCK_INITIALIZER ((struct pthread_rwlock *)NULL)
135#define THR_RWLOCK_DESTROYED ((struct pthread_rwlock *)1)
136
128struct pthread_mutex {
129 /*
130 * Lock for accesses to this structure.
131 */
132 struct umutex m_lock;
133 enum pthread_mutextype m_type;
134 struct pthread *m_owner;
135 int m_count;

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

622extern atfork_head _thr_atfork_list __hidden;
623extern struct urwlock _thr_atfork_lock __hidden;
624
625/* Default thread attributes: */
626extern struct pthread_attr _pthread_attr_default __hidden;
627
628/* Default mutex attributes: */
629extern struct pthread_mutex_attr _pthread_mutexattr_default __hidden;
137struct pthread_mutex {
138 /*
139 * Lock for accesses to this structure.
140 */
141 struct umutex m_lock;
142 enum pthread_mutextype m_type;
143 struct pthread *m_owner;
144 int m_count;

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

631extern atfork_head _thr_atfork_list __hidden;
632extern struct urwlock _thr_atfork_lock __hidden;
633
634/* Default thread attributes: */
635extern struct pthread_attr _pthread_attr_default __hidden;
636
637/* Default mutex attributes: */
638extern struct pthread_mutex_attr _pthread_mutexattr_default __hidden;
639extern struct pthread_mutex_attr _pthread_mutexattr_adaptive_default __hidden;
630
631/* Default condition variable attributes: */
632extern struct pthread_cond_attr _pthread_condattr_default __hidden;
633
634extern struct pthread_prio _thr_priorities[] __hidden;
635
636extern pid_t _thr_pid __hidden;
637extern int _thr_is_smp __hidden;

--- 157 unchanged lines hidden ---
640
641/* Default condition variable attributes: */
642extern struct pthread_cond_attr _pthread_condattr_default __hidden;
643
644extern struct pthread_prio _thr_priorities[] __hidden;
645
646extern pid_t _thr_pid __hidden;
647extern int _thr_is_smp __hidden;

--- 157 unchanged lines hidden ---