Deleted Added
full compact
thr_init.c (144711) thr_init.c (144921)
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 144711 2005-04-06 13:57:31Z davidxu $
33 * $FreeBSD: head/lib/libthr/thread/thr_init.c 144921 2005-04-12 03:00:28Z davidxu $
34 */
35
36/* Allocate space for global thread variables here: */
37#define GLOBAL_PTHREAD_PRIVATE
38
39#include "namespace.h"
40#include <sys/param.h>
41#include <sys/types.h>

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

304 if (first) {
305 SIGFILLSET(sigset);
306 SIGDELSET(sigset, SIGTRAP);
307 __sys_sigprocmask(SIG_SETMASK, &sigset, &oldset);
308 _thr_signal_init();
309 _thr_initial = curthread;
310 SIGDELSET(oldset, SIGCANCEL);
311 __sys_sigprocmask(SIG_SETMASK, &oldset, NULL);
34 */
35
36/* Allocate space for global thread variables here: */
37#define GLOBAL_PTHREAD_PRIVATE
38
39#include "namespace.h"
40#include <sys/param.h>
41#include <sys/types.h>

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

304 if (first) {
305 SIGFILLSET(sigset);
306 SIGDELSET(sigset, SIGTRAP);
307 __sys_sigprocmask(SIG_SETMASK, &sigset, &oldset);
308 _thr_signal_init();
309 _thr_initial = curthread;
310 SIGDELSET(oldset, SIGCANCEL);
311 __sys_sigprocmask(SIG_SETMASK, &oldset, NULL);
312 _thr_report_creation(curthread, curthread);
312 }
313}
314
315/*
316 * This function and pthread_create() do a lot of the same things.
317 * It'd be nice to consolidate the common stuff in one place.
318 */
319static void

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

379 size_t len;
380 int mib[2];
381
382 _thr_umtx_init(&_mutex_static_lock);
383 _thr_umtx_init(&_cond_static_lock);
384 _thr_umtx_init(&_rwlock_static_lock);
385 _thr_umtx_init(&_keytable_lock);
386 _thr_umtx_init(&_thr_atfork_lock);
313 }
314}
315
316/*
317 * This function and pthread_create() do a lot of the same things.
318 * It'd be nice to consolidate the common stuff in one place.
319 */
320static void

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

380 size_t len;
381 int mib[2];
382
383 _thr_umtx_init(&_mutex_static_lock);
384 _thr_umtx_init(&_cond_static_lock);
385 _thr_umtx_init(&_rwlock_static_lock);
386 _thr_umtx_init(&_keytable_lock);
387 _thr_umtx_init(&_thr_atfork_lock);
388 _thr_umtx_init(&_thr_event_lock);
387 _thr_spinlock_init();
388 _thr_list_init();
389
390 /*
391 * Avoid reinitializing some things if they don't need to be,
392 * e.g. after a fork().
393 */
394 if (init_once == 0) {

--- 23 unchanged lines hidden ---
389 _thr_spinlock_init();
390 _thr_list_init();
391
392 /*
393 * Avoid reinitializing some things if they don't need to be,
394 * e.g. after a fork().
395 */
396 if (init_once == 0) {

--- 23 unchanged lines hidden ---