Deleted Added
full compact
thr_cancel.c (117277) thr_cancel.c (126000)
1/*
2 * David Leonard <d@openbsd.org>, 1999. Public domain.
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 $
3 * $FreeBSD: head/lib/libthr/thread/thr_cancel.c 126000 2004-02-19 13:51:52Z 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
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_BARRIER_WAIT:
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 ---
97 case PS_MUTEX_WAIT:
98 case PS_COND_WAIT:
99 /*
100 * Threads in these states may be in queues.
101 * In order to preserve queue integrity, the
102 * cancelled thread must remove itself from the
103 * queue. When the thread resumes, it will
104 * remove itself from the queue and call the

--- 131 unchanged lines hidden ---