Hi,
As part of porting our application from 32bit to 64bit on windows, I have started building our code with Visual Studio 2008.
I was able to build the existing code successfully without any major changes.
But when I am running the application I can see that one thread is hanging.
Following is the scenario:
a. From main thread we are creating one thread A
b. This new thread A creates one more thread B.
c. Thread A does some processing and then waits for Thread B.
d. For waiting we are using this function.
WaitForMultipleObjects(2, wait_hnd, FALSE, INFINITE);
Below are the contents of wait_hnd array.
wait_hnd[0] = thread->hThread;( Handle to the thread B )<br/>
wait_hnd[1] = pthread_self_ptr->wait_event; ( Wait event for thread A )
e. Here I am observing that this function just hangs. And does not return me anything in the code. Even though the thread B is running i am not getting any return value from this function.
This code works fine on windows 32bit platforms.
Not sure if because of the windows 64bit platforms, is there any changes in this API.
I am running my application on windows 2003 server R2 x64 edition.
If anyone can help me out with this, that will be really great.
Thanks in advance.
-Sushil
View the full article
As part of porting our application from 32bit to 64bit on windows, I have started building our code with Visual Studio 2008.
I was able to build the existing code successfully without any major changes.
But when I am running the application I can see that one thread is hanging.
Following is the scenario:
a. From main thread we are creating one thread A
b. This new thread A creates one more thread B.
c. Thread A does some processing and then waits for Thread B.
d. For waiting we are using this function.
WaitForMultipleObjects(2, wait_hnd, FALSE, INFINITE);
Below are the contents of wait_hnd array.
wait_hnd[0] = thread->hThread;( Handle to the thread B )<br/>
wait_hnd[1] = pthread_self_ptr->wait_event; ( Wait event for thread A )
e. Here I am observing that this function just hangs. And does not return me anything in the code. Even though the thread B is running i am not getting any return value from this function.
This code works fine on windows 32bit platforms.
Not sure if because of the windows 64bit platforms, is there any changes in this API.
I am running my application on windows 2003 server R2 x64 edition.
If anyone can help me out with this, that will be really great.
Thanks in advance.
-Sushil
View the full article