[EMAIL PROTECTED] wrote:
>
> How can i protect some resource from accessed by two thread in the same time.
> what is the counterpart function as waitforsingleobject() under windows. a short
> pieces of codes will be appreciated
>
> thanks a lot
You need to use a mutex. Under RTAI you can use the conventional
pthread_mutex_lock and pthread_mutex_unlock. As always, be very careful
with your design as mutex_lock, could easily be mutex_deadlock :-)
Regards, Stuart
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/