thr_join.c (78873) | thr_join.c (81750) |
---|---|
1/* 2 * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. 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 --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. 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 --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/lib/libkse/thread/thr_join.c 78873 2001-06-27 11:41:15Z jasone $ | 32 * $FreeBSD: head/lib/libkse/thread/thr_join.c 81750 2001-08-16 06:31:32Z jasone $ |
33 */ 34#include <errno.h> 35#include <pthread.h> 36#include "pthread_private.h" 37 38__weak_reference(_pthread_join, pthread_join); 39 40int --- 75 unchanged lines hidden (view full) --- 116 /* Multiple joiners are not supported. */ 117 ret = ENOTSUP; 118 119 /* Check if the thread is not dead: */ 120 } else if (pthread->state != PS_DEAD) { 121 /* Set the running thread to be the joiner: */ 122 pthread->joiner = curthread; 123 | 33 */ 34#include <errno.h> 35#include <pthread.h> 36#include "pthread_private.h" 37 38__weak_reference(_pthread_join, pthread_join); 39 40int --- 75 unchanged lines hidden (view full) --- 116 /* Multiple joiners are not supported. */ 117 ret = ENOTSUP; 118 119 /* Check if the thread is not dead: */ 120 } else if (pthread->state != PS_DEAD) { 121 /* Set the running thread to be the joiner: */ 122 pthread->joiner = curthread; 123 |
124 /* Keep track of which thread we're joining to: */ 125 curthread->data.thread = pthread; 126 |
|
124 /* Schedule the next thread: */ 125 _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__); 126 127 /* 128 * The thread return value and error are set by the thread we're 129 * joining to when it exits or detaches: 130 */ 131 ret = curthread->error; --- 26 unchanged lines hidden --- | 127 /* Schedule the next thread: */ 128 _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__); 129 130 /* 131 * The thread return value and error are set by the thread we're 132 * joining to when it exits or detaches: 133 */ 134 ret = curthread->error; --- 26 unchanged lines hidden --- |