vikky@gmail.com
2005-03-16 02:32:02 UTC
Hi ,
I am porting an application from windows to linux. It uses function
WaitForMultipleObjects() to wait on multiple events and on the basis of
what event is signalled (which is specified by the functions return
value) it takes furthur action. The function is actually being used
here to wait for only two events,in mode where it returns if any of the
event is signalled. The first one being any event while the second one
always being the event signalled when the application is closing.
I am using pthreads in linux to port the application but i got stuck on
how to implement WaitForMultipleObjects() semantics. The closest
analogue i found to WaitForSingleObject() is using condition variables
and waiting on them. But alas i can't find any function in pthread
library that can wait on multiple condition varibles. I want to ask how
a suitable replacement for WaitForMultipleObjects() can be made.
Thanking you in advance,
Vikky
I am porting an application from windows to linux. It uses function
WaitForMultipleObjects() to wait on multiple events and on the basis of
what event is signalled (which is specified by the functions return
value) it takes furthur action. The function is actually being used
here to wait for only two events,in mode where it returns if any of the
event is signalled. The first one being any event while the second one
always being the event signalled when the application is closing.
I am using pthreads in linux to port the application but i got stuck on
how to implement WaitForMultipleObjects() semantics. The closest
analogue i found to WaitForSingleObject() is using condition variables
and waiting on them. But alas i can't find any function in pthread
library that can wait on multiple condition varibles. I want to ask how
a suitable replacement for WaitForMultipleObjects() can be made.
Thanking you in advance,
Vikky