=== ----- Original Message ----- From: "Lassi A. Tuura" <[EMAIL PROTECTED]> To: "Evan Pollan" <[EMAIL PROTECTED]> Cc: "Robert Collins" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> 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/