Deleted Added
full compact
thr_init.c (223294) thr_init.c (234947)
1/*
2 * Copyright (c) 2003 Daniel M. Eischen <deischen@freebsd.org>
3 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1/*
2 * Copyright (c) 2003 Daniel M. Eischen <deischen@freebsd.org>
3 * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $FreeBSD: head/lib/libthr/thread/thr_init.c 223294 2011-06-19 13:35:36Z kan $
33 * $FreeBSD: head/lib/libthr/thread/thr_init.c 234947 2012-05-03 09:17:31Z davidxu $
34 */
35
36#include "namespace.h"
37#include <sys/types.h>
38#include <sys/signalvar.h>
39#include <sys/ioctl.h>
40#include <sys/sysctl.h>
41#include <sys/ttycom.h>

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

107pid_t _thr_pid;
108int _thr_is_smp = 0;
109size_t _thr_guard_default;
110size_t _thr_stack_default = THR_STACK_DEFAULT;
111size_t _thr_stack_initial = THR_STACK_INITIAL;
112int _thr_page_size;
113int _thr_spinloops;
114int _thr_yieldloops;
34 */
35
36#include "namespace.h"
37#include <sys/types.h>
38#include <sys/signalvar.h>
39#include <sys/ioctl.h>
40#include <sys/sysctl.h>
41#include <sys/ttycom.h>

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

107pid_t _thr_pid;
108int _thr_is_smp = 0;
109size_t _thr_guard_default;
110size_t _thr_stack_default = THR_STACK_DEFAULT;
111size_t _thr_stack_initial = THR_STACK_INITIAL;
112int _thr_page_size;
113int _thr_spinloops;
114int _thr_yieldloops;
115int _thr_queuefifo = 4;
115int _gc_count;
116struct umutex _mutex_static_lock = DEFAULT_UMUTEX;
117struct umutex _cond_static_lock = DEFAULT_UMUTEX;
118struct umutex _rwlock_static_lock = DEFAULT_UMUTEX;
119struct umutex _keytable_lock = DEFAULT_UMUTEX;
120struct urwlock _thr_list_lock = DEFAULT_URWLOCK;
121struct umutex _thr_event_lock = DEFAULT_UMUTEX;
122

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

465 _pthread_attr_default.guardsize_attr = _thr_guard_default;
466 _pthread_attr_default.stacksize_attr = _thr_stack_default;
467 env = getenv("LIBPTHREAD_SPINLOOPS");
468 if (env)
469 _thr_spinloops = atoi(env);
470 env = getenv("LIBPTHREAD_YIELDLOOPS");
471 if (env)
472 _thr_yieldloops = atoi(env);
116int _gc_count;
117struct umutex _mutex_static_lock = DEFAULT_UMUTEX;
118struct umutex _cond_static_lock = DEFAULT_UMUTEX;
119struct umutex _rwlock_static_lock = DEFAULT_UMUTEX;
120struct umutex _keytable_lock = DEFAULT_UMUTEX;
121struct urwlock _thr_list_lock = DEFAULT_URWLOCK;
122struct umutex _thr_event_lock = DEFAULT_UMUTEX;
123

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

466 _pthread_attr_default.guardsize_attr = _thr_guard_default;
467 _pthread_attr_default.stacksize_attr = _thr_stack_default;
468 env = getenv("LIBPTHREAD_SPINLOOPS");
469 if (env)
470 _thr_spinloops = atoi(env);
471 env = getenv("LIBPTHREAD_YIELDLOOPS");
472 if (env)
473 _thr_yieldloops = atoi(env);
474 env = getenv("LIBPTHREAD_QUEUE_FIFO");
475 if (env)
476 _thr_queuefifo = atoi(env);
473 TAILQ_INIT(&_thr_atfork_list);
474 }
475 init_once = 1;
476}
477 TAILQ_INIT(&_thr_atfork_list);
478 }
479 init_once = 1;
480}