mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Solving the Pthreads issue


From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] Solving the Pthreads issue
Date: Mon, 10 May 2010 12:17:52 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Martin Lambers <address@hidden> schrieb:
> I did not have a look at it, but maybe it would be possible to 
>       
>       3) Patch pthreads-win32 so that the pthread_win32_thread_*
>          functions are not needed anymore.
> 
> For example, instead of using a thread main function given to
> phtread_create() directly, the library could use an internal wrapper
> that calls the thread main function and also calls the attach/detach
> functions if necessary.
> 
> The pthread_win32_process_* functions would be less critical because
> they only have to be added once per main function. One could check
> on each function call whether the library was initialized, and if not,
> call pthread_win32_process_attach().

That's a wonderful idea!

I wonder why the original authors didn't do that. The obvious explaination
would be that they simply had no real interest in providing a static
pthreads library.

However, there could have been technical reasons, too, although I
currently can't think of any.

> I would argue that better compatibility to the POSIX API outweighs
> the increased overhead.

I fully agree.

Patching pthreads is far better than patching all the other
libraries.

> Does anyone know pthreads-win32 good enough to see if this would be
> possible?

Your proposal looks very reasonable to me. Would you take
to time to post exactly that proposal to Ross Johnson, the
Pthreads-win32 maintainer?

You'll find his email address on the project's website.
http://sources.redhat.com/pthreads-win32/

Maybe you're lucky and get a reply.

There is also a project mailing list, but it appears to be
quite dead. That's why I recommend to contact the author
directly.

Also, if you find the time for that, feel free to propose a
patch that implements your idea. Working code is always a
better starting point for discussions.


Greets,

    Volker

-- 
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR




reply via email to

[Prev in Thread] Current Thread [Next in Thread]