Web lists-archives.com

Re: [Mingw-users] GCC-4.9.3 is now our current release




Just lending a hand with mingw.org development :) ,
atm they are missing out on things like openmp and c++11 support, which 
needs a posix thread implementation.

Keith prefers pthreads-w32 over winpthreads (license issue i think) but 
current gcc no longer builds with pthreads-w32 so im trying to backport 
the changes nessesary for it to work again.

Might have a fix also for objective-c

/* Create a new thread of execution.  */
static inline objc_thread_t
__gthread_objc_thread_detach (void (*func)(void *), void *arg)
{
   objc_thread_t thread_id;
   pthread_t new_thread_handle;

   if (!__gthread_active_p ())
     return NULL;

   if (!(__gthrw_(pthread_create) (&new_thread_handle, 
&_objc_thread_attribs,
                   (void *) func, arg)))
     thread_id = *(objc_thread_t *) &new_thread_handle; /* fails with 
pthreads-w32, cannot convert to a pointer type, changed a bit so now it 
should */
   else
     thread_id = NULL;

   return thread_id;
}

Im from denmark so i forgot the correct description for the error in 
english, but its a pointer error,
it basically bitches about not being able to convert a struct to a 
pointer (makes sense) since gcc now expects this
to be a simple pointer to an unsigned integer scalar (like on linux).

If this works its a simple enough fix, i could even guard it with a 
check for PTW32_VERSION or else revert to original behaviour, same goes 
for the fix in libstdc++.

As for myself i can happily live with winpthreads,
but it does require you to pack its license with everything built with it,
i guess thats the same reason Keith does not want to use it either.

Well i better get to bed its getting rather late here (again) ;) sleep 
well m8.

Den 17-03-2016 kl. 03:51 skrev K. Frank:
> Hi Ralph!
>
> A couple of comments, below.
>
> On Wed, Mar 16, 2016 at 10:14 PM, ralph engels <ralphengels@xxxxxxxxx> wrote:
>> Damn it runs right to the end and then fails on objc here
>>
>> thread_id = (objc_thread_t) new_thread_handle; cannot convert to a
>> referral type
>>
>> with an error about it not being able to convert it.
>>
>> objc_thread_t thread_id; = scalar
>> pthread_t new_thread_handle; =  struct
> "objc" sounds suspiciously like objective-c to me.  I happily made no
> attempt to support objective-c.  (My goal was to get g++ working with
> std::thread.)  However, I don't recall doing anything to turn objective-c
> off.
>
>> this is from gthr-default.h
> My recollection is that gthr-default.h mapped somehow to (maybe it was
> simply a copy of) either gthr-posix.h or gthr-win32.h.  My experiments
> getting std::thread to work via pthreads-win32 were based on tweaking
> gthr-posix.h.
>
>> guess its back to the drawing board.
> Maybe see whether your gthr-default.h is (more like) gthr-posix.h or
> gthr-win32.h (although I'm not sure what that would tell you).
>
> Also, if you don't need to support objective-c, maybe there's some macro
> define that turns objective-c threading on or off.  If so, maybe you could
> just disable objective-c and your problem might go away.  (Just guessing.)
>
> Again, I'd be curious to know what your specific goal is.
>
>
> Happy C++ Hacking!
>
>
> K. Frank
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> _______________________________________________
> MinGW-users mailing list
> MinGW-users@xxxxxxxxxxxxxxxxxxxxx
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe