[Top][All Lists]
[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: |
Tue, 4 May 2010 05:45:03 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Martin Lambers <address@hidden> schrieb:
> To use the pthread API both on Linux and on W32 via Mingw-cross-env, I
> had to do the following in my application for each thread function that
> is given to pthread_create():
>
> void *thread_function(void *ptr)
> {
> #ifdef PTW32_STATIC_LIB
> pthread_win32_thread_attach_np();
> #endif
>
> ... do the work ...
>
> #ifdef PTW32_STATIC_LIB
> pthread_win32_thread_detach_np();
> #endif
> return NULL;
> }
>
> These extra calls are probably missing in most libraries or applications
> that use pthreads, because they are not necessary on POSIX systems.
> Maybe this is one reason for the failures that were observed on this
> list.
This is a very interesting work-around. Thanks for sharing!
It might be a good way to fix packages that absolutely need
Pthreads, and could even have a chance to get accepted by the
respective upstream project.
Greets,
Volker
--
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR
- [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/03
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Gregory Smith, 2010/05/03
- [Mingw-cross-env-list] Re: Solving the Pthreads issue, Nikos Chantziaras, 2010/05/03
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, David Bruce, 2010/05/03
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Martin Lambers, 2010/05/03
- Re: [Mingw-cross-env-list] Solving the Pthreads issue,
Volker Grabsch <=
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Dmitry Groshev, 2010/05/06
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/06
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/06
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/07
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/07
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Gregory Smith, 2010/05/07
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/08
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/09
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/09
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/09