Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" To: "Lassi A. Tuura" , "Evan Pollan" Cc: 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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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" To: "Evan Pollan" Cc: "Robert Collins" ; 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/