delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <024201c16db4$ef5f36e0$0200a8c0@lifelesswks> |
From: | "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au> |
To: | "Lassi A. Tuura" <lassi DOT tuura AT cern DOT ch>, |
"Evan Pollan" <evan_pollan AT yahoo DOT com> | |
Cc: | <cygwin AT cygwin DOT com> |
References: | <20011114212317 DOT 56701 DOT qmail AT web21002 DOT mail DOT yahoo DOT com> <3BF384BA DOT B2DD3ECB AT cern DOT ch> |
Subject: | Re: pthread_create -- no callback? |
Date: | Thu, 15 Nov 2001 20:07:21 +1100 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 6.00.2600.0000 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
X-OriginalArrivalTime: | 15 Nov 2001 09:05:31.0799 (UTC) FILETIME=[ADA66A70:01C16DB4] |
=== ----- Original Message ----- From: "Lassi A. Tuura" <lassi DOT tuura AT cern DOT ch> To: "Evan Pollan" <evan_pollan AT yahoo DOT com> Cc: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>; <cygwin AT cygwin DOT com> Sent: Thursday, November 15, 2001 8:02 PM Subject: Re: pthread_create -- no callback? > > That's all I needed. My experience is very stale w/ C & C++, but why didn't I > > get at least a compilation warning when I passed the reference to the thread, > > rather than its value? > > Because pthread_t == void *. I am sure cygwin team would accept > a patch that consistently uses for example an opaque type[*]. I > suppose it might be a lot of simple-minded editing, but it would > help catch a lot of trivial errors. Yes, in fact void * was intended to serve the same purpose (as opposed to a fully defined struct which the prior implementation had. > [*] Like this: `struct __pthread; typedef __pthread *pthread_t;'. Thank you. I've put this in my mail archive and will do a patch at some point - if noone beats me to it that is :]. > This is all the client side knows about `__pthread', hence it is > opaque. The struct is defined in the implementation only. Works > of course only if the implementation really uses structs. From a > superficial inspection there's a 'pthread' class on cygwin side so > it would work, but I couldn't quite figure out where the code made > the transition from pthread_t == void * to pthread_t == pthread *. Inside cygwin, pthread_t == class pthread ** Rob -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |