thr_list.c (144736) | thr_list.c (144921) |
---|---|
1/* 2 * Copyright (c) 2005 David Xu <davidxu@freebsd.org> 3 * Copyright (C) 2003 Daniel M. Eischen <deischen@freebsd.org> 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: --- 10 unchanged lines hidden (view full) --- 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * | 1/* 2 * Copyright (c) 2005 David Xu <davidxu@freebsd.org> 3 * Copyright (C) 2003 Daniel M. Eischen <deischen@freebsd.org> 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: --- 10 unchanged lines hidden (view full) --- 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/lib/libthr/thread/thr_list.c 144736 2005-04-07 06:09:17Z davidxu $ | 27 * $FreeBSD: head/lib/libthr/thread/thr_list.c 144921 2005-04-12 03:00:28Z davidxu $ |
28 */ 29 30#include <sys/types.h> 31#include <sys/queue.h> 32 33#include <stdlib.h> 34#include <string.h> 35#include <pthread.h> --- 58 unchanged lines hidden (view full) --- 94 TAILQ_HEAD(, pthread) worklist; 95 96 TAILQ_INIT(&worklist); 97 THREAD_LIST_LOCK(curthread); 98 99 /* Check the threads waiting for GC. */ 100 for (td = TAILQ_FIRST(&_thread_gc_list); td != NULL; td = td_next) { 101 td_next = TAILQ_NEXT(td, gcle); | 28 */ 29 30#include <sys/types.h> 31#include <sys/queue.h> 32 33#include <stdlib.h> 34#include <string.h> 35#include <pthread.h> --- 58 unchanged lines hidden (view full) --- 94 TAILQ_HEAD(, pthread) worklist; 95 96 TAILQ_INIT(&worklist); 97 THREAD_LIST_LOCK(curthread); 98 99 /* Check the threads waiting for GC. */ 100 for (td = TAILQ_FIRST(&_thread_gc_list); td != NULL; td = td_next) { 101 td_next = TAILQ_NEXT(td, gcle); |
102 if (td->terminated == 0) { | 102 if (td->tid != TID_TERMINATED) { |
103 /* make sure we are not still in userland */ 104 continue; 105 } 106 _thr_stack_free(&td->attr); 107 if (((td->tlflags & TLFLAGS_DETACHED) != 0) && 108 (td->refcount == 0)) { 109 THR_GCLIST_REMOVE(td); 110 /* --- 221 unchanged lines hidden --- | 103 /* make sure we are not still in userland */ 104 continue; 105 } 106 _thr_stack_free(&td->attr); 107 if (((td->tlflags & TLFLAGS_DETACHED) != 0) && 108 (td->refcount == 0)) { 109 THR_GCLIST_REMOVE(td); 110 /* --- 221 unchanged lines hidden --- |