Re: Events

From: Gyorgy Molnar (yuri@powercom.com.sg)
Date: Mon Jun 26 2000 - 04:41:53 EST


Hi Steve,

I'm working with pthread library, as well. But I haven't known I can wait
for more than one event int the same time with cond. var.
I've made a simple test program for cond. variables. My main idea was, there
is only one wait function active in the same time.
I used one cond.var. for each thread to wake them up. For the events I used
a struct to keep the status of the events and a list for all of the
cond.var whitch was wating for this event . When an event was set up, the
program is checked out if there is a thread to wait for this event. With
this technic I could wait for the same event in different threads, and of
course for multiple events, as well.

Basically it was working well. The only problem I had, I couldn't handle the
async io. I really don't know what to do with it.

Do you have an idea where I can find some more information about pthread?

Cheers,
Yuri

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:07 EST