diff options
author | David Leonard <d@cvs.openbsd.org> | 1999-05-12 06:00:01 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 1999-05-12 06:00:01 +0000 |
commit | d1e4242b06e8535818a59bd49dc7c1387eb2dcd0 (patch) | |
tree | 4fbf14fcc532cc926c07d9795c5f278b44fdfe85 /lib/libpthread | |
parent | c5056c968bd1e451a0b717791773db497eb9ddb8 (diff) |
permit NULL result parameter for pthread_create(). Apparently used in Stevens?
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/uthread/uthread_create.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/uthread/uthread_create.c b/lib/libpthread/uthread/uthread_create.c index d4542c6624b..eede7c6b5e9 100644 --- a/lib/libpthread/uthread/uthread_create.c +++ b/lib/libpthread/uthread/uthread_create.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: uthread_create.c,v 1.8 1999/03/10 10:06:22 d Exp $ + * $OpenBSD: uthread_create.c,v 1.9 1999/05/12 06:00:00 d Exp $ */ #include <errno.h> #include <stdlib.h> @@ -174,7 +174,8 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr, _unlock_thread_list(); /* Return a pointer to the thread structure: */ - (*thread) = new_thread; + if (thread != NULL) + (*thread) = new_thread; /* Schedule the new user thread: */ _thread_kern_sched(NULL); |