[445] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

Use of wait_data structure elements

daemon@ATHENA.MIT.EDU (Larry V. Streepy, Jr.)
Wed Oct 2 20:05:24 1996

Date: Wed, 02 Oct 1996 17:49:43 -0600
From: "Larry V. Streepy, Jr." <streepy@healthcare.com>
To: pthreads mailing list <pthreads@MIT.EDU>

In the structure:

union pthread_wait_data {
    pthread_mutex_t * mutex;
    pthread_cond_t  * cond;
    const sigset_t  * sigwait;	/* Waiting on a signal in sigwait */
    struct {
	short	fd;		/* Used when thread waiting on fd */
	short	branch;		/* line number, for debugging */
    } fd;
    struct pthread_select_data * select_data;
};

The fields mutex and cond are never used anywhere in the pthreads code. 
I could really use both of these in implementing pthread_cancel (which
needs to be able to reaquire a mutex if a cond_wait is cancelled).

Anyone know a reason not to use them?
-- 
Larry V. Streepy, Jr.
Chief Technical Officer,  Healthcare Communications, Inc.
mailto:streepy@healthcare.com
(214) 851-7033 (Dallas Main #)
(970) 626-5028 (My office #)			(970) 626-4425  (Fax)

home help back first fref pref prev next nref lref last post