pthread_join: explicitly test for cancellation.
This commit is contained in:
parent
40818746b1
commit
39a9e71121
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: pthread.c,v 1.101 2008/05/25 17:05:28 ad Exp $ */
|
/* $NetBSD: pthread.c,v 1.102 2008/06/25 11:06:34 ad Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
* Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||||
@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__RCSID("$NetBSD: pthread.c,v 1.101 2008/05/25 17:05:28 ad Exp $");
|
__RCSID("$NetBSD: pthread.c,v 1.102 2008/06/25 11:06:34 ad Exp $");
|
||||||
|
|
||||||
#define __EXPOSE_STACK 1
|
#define __EXPOSE_STACK 1
|
||||||
|
|
||||||
@ -594,6 +594,7 @@ pthread_join(pthread_t thread, void **valptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
pthread__testcancel(self);
|
||||||
if (valptr != NULL)
|
if (valptr != NULL)
|
||||||
*valptr = thread->pt_exitval;
|
*valptr = thread->pt_exitval;
|
||||||
/* pthread__reap() will drop the lock. */
|
/* pthread__reap() will drop the lock. */
|
||||||
|
Loading…
Reference in New Issue
Block a user