Multi-threaded programs

Ronald Landheer-Cieslak ronald@landheer.com
Tue Apr 8 17:48:00 GMT 2003


Using the -mno-cygwin option makes you use the MinGW compiler, which makes 
this mail off-topic on the Cygwin list. I've redirected this mail there 
Please remove cygwin@cygwin.com from the cc list when replying.

On Tue, 8 Apr 2003, Ignasi Villagrasa wrote:
> Because of many Win32 features, I'd like to maintain windows 
> compatibility and so use Win32 API functions by now. In future I'd like 
> to have a Posix compatible code, but I have noticed there are many 
> functions I should change now and maintaining current code lets me 
> compare easily the Watcom compiled executable and the cygwin one if 
> differences appear. So I use -no-cygwin flag. After some steps I could 
> compile and link the program, but I have noticed there's a problem using 
> multi-thread Windows functions and cygwin compiler. When I combine 
> exceptions (try/catch structures) and muti-threading (Win 32 native API) 
> , the compiler crashes.
    ^^^^^^^^^^^^^^^^^^^^
Is this really what you mean, or do you mean your program crashes as a 
result of all this?

If this is really what you mean, it's a bug in the compiler (which should 
never crash), which may be specific to the MinGW version, or may not be. 
The people on the MinGW list know a lot more about that than I do.

That last remark (that they know a lot more about ... than I do) also goes 
for the Windows threading stuff - I've never used Windows threads in my 
life.

> I have been looking for similar behaviour and found in this mailing list
> some people with the same problem. They explain the problem as if the
> compiler uses shared tables to manage exceptions and provoke access
> violation when muti-threading is used.
If you could provide links to the messages you found, that may be helpful 
:)

> At fact, these cases are referred to aprox. 2 years ago. So I'd like to 
> know if this can be solved upgrading any package, or if I even could use 
> pthreads but maintain the rest of Win32 API calls.
You haven't included any information as to what versions you are using. 
Please have a look at http://cygwin.com/bugs.html to see what's missing, 
(and especially make sure to *attach* the output of cygcheck -s -v -r > 
cygcheck.out)

rlc



--
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/



More information about the Cygwin mailing list