Go to Google Groups Home    comp.unix.programmer
Re: copying pthread_mutex_t, pthread_cond_t

Philip Guenther <guent...@gmail.com>

On Jul 4, 2:50 am, James Kanze <james.ka...@gmail.com> wrote:

> Basically, is it legal to copy a pthread_mutex_t or a
> pthread_cond_t, and use the copy?

A program that does that invokes undefined behavior.

> If not (which is the only answer which makes sense to
> me), where does the Posix specification say this?

You know, you really ought to get your computer fixed so that you can
download your own copy of the standard or access the online copy.
Please read the fifth and fourth paragraphs, respectively, of the
DESCRIPTION sections of the following two pages:

http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_mute...

http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_cond...

I don't understand why David makes claims about what the standard says
or doesn't say which are not true.

Philip Guenther