Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion copying pthread_mutex_t, pthread_cond_t

View Parsed - Show only message text

Path: g2news1.google.com!postnews.google.com!p18g2000pra.googlegroups.com!not-for-mail
From: Philip Guenther <guent...@gmail.com>
Newsgroups: comp.unix.programmer
Subject: Re: copying pthread_mutex_t, pthread_cond_t
Date: Sat, 4 Jul 2009 13:32:28 -0700 (PDT)
Organization: http://groups.google.com
Lines: 27
Message-ID: <1b8ff944-dccf-429a-a999-24b0a31b54ea@p18g2000pra.googlegroups.com>
References: <11b4bf56-2145-4bce-bfec-116e4d92957a@b9g2000yqm.googlegroups.com>
NNTP-Posting-Host: 63.211.143.38
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1246739549 18558 127.0.0.1 (4 Jul 2009 20:32:29 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 4 Jul 2009 20:32:29 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p18g2000pra.googlegroups.com; posting-host=63.211.143.38; 
	posting-account=bzpegQoAAABnTq5JDqg52UTZOtil5p5c
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.0.10) 
	Gecko/2009051802 Firefox/3.0.10,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 vanye.sendmail.com:3128 (squid/2.7.STABLE6)

On Jul 4, 2:50=A0am, 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_mutex_dest=
roy.html

http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_cond_destr=
oy.html


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


Philip Guenther

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google