Deleted Added
sdiff udiff text old ( 117277 ) new ( 126000 )
full compact
1/*
2 * David Leonard <d@openbsd.org>, 1999. Public domain.
3 * $FreeBSD: head/lib/libthr/thread/thr_cancel.c 117277 2003-07-06 10:18:48Z mtm $
4 */
5#include <sys/errno.h>
6#include <pthread.h>
7#include <stdlib.h>
8#include "thr_private.h"
9
10/*
11 * Static prototypes

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

88 pthread->join_status.thread->joiner = NULL;
89 UMTX_UNLOCK(&joined->lock);
90 joined = pthread->join_status.thread = NULL;
91 }
92 pthread->cancelflags |= PTHREAD_CANCELLING;
93 PTHREAD_NEW_STATE(pthread, PS_RUNNING);
94 break;
95
96 case PS_MUTEX_WAIT:
97 case PS_COND_WAIT:
98 /*
99 * Threads in these states may be in queues.
100 * In order to preserve queue integrity, the
101 * cancelled thread must remove itself from the
102 * queue. When the thread resumes, it will
103 * remove itself from the queue and call the

--- 131 unchanged lines hidden ---