Dee Ayy
2007-Apr-15 17:21 UTC
[Wine] pthreads with Darwine Xcode template? (or Wine Windows message pump + sockets + threads sample)
I am trying to run the following pthread example with the Darwine Xcode template: http://www.llnl.gov/computing/tutorials/pthreads/samples/hello.c from http://www.llnl.gov/computing/tutorials/pthreads/ Example Code - Pthread Creation and Termination But the code inside PrintHello does not appear to execute. Can you help me? What I really need is a way to handle multiple client sockets from code I'm writing using these two tutorials: http://www.codeproject.com/internet/beginningtcp_cpp.asp http://www.gamedev.net/reference/articles/article1059.asp so I was trying to write my own startThread function since I don't see the gamedev author's threading implementation. (I'm trying to write a server to run on Mac OSX that uses MS Window messages due to needing this library: MetaTrader 3 API from the following link: http://www.metaquotes.net/files/mtapi.zip ) Using the Darwine Xcode template (which I was able to compile with my modifications posted to the Darwine-devel list) and using winsock sockets, I noticed my thread function did not appear to execute, so I tried a test with the basic Xcode template. The simple pthread example will work when compiled with gcc in a Mac OSX X11 shell, but no joy with the Darwine Xcode template. I have MS Window messaging working with the Darwine template, but I need the multi-client threading piece. I suppose for pure Wine, I need a sample that has a Windows message pump and can use threads and sockets. Please advise.
Dee Ayy
2007-Apr-15 19:36 UTC
[Wine] Re: pthreads with Darwine Xcode template? (or Wine Windows message pump + sockets + threads sample)
Just a few more hours of searching and I realize I can use Win32 process.h and _beginthread should suffice. I did think the benefit of using Winelib was so I could use my host libraries (pthreads in this case). Well hopefully I can setup this Win32 server piece and do the rest of my development on native Mac OSX.> I suppose for pure Wine, I need a sample that has a Windows message > pump and can use threads and sockets. > > Please advise. >