Wolfgang Grandegger wrote: > [EMAIL PROTECTED] wrote: >> Testing with the native skin I notice (Xenomai2.2.0) that mutex >> doesn't behave >> like I think: >> 1. create a mutex >> 2. lock the mutex (infinite) >> 3. start a RT task >> 4. lock the mutex in the RT task (infinite) >> 5. register an interrupt >> >> 6a. ...wait... >> 6. reach an interrupt and unlock the mutex >> 6b. ...then... >> >> 7. start 2-times the code after the previous rt_mutex_lock [this is not >> correct!!!] >> 8. goto 6a. >> >> the rt_mutex_lock is clearly in a for loop. >> Probably I'm in truble. Using a semaphore resolve my problems. >> When using mutex I lose the machine control. > > I don't have a quick answer but maybe somebody else can help.
Antonio, please use a recent Xenomai version (e.g. 2.2.5) to avoid that we may hunt old issues. Next post a simple demo code to xenomai-help, showing the misbehaviour. We could then check if other archs are involved, if it's reproducible on further PPC boards, or if some mistake might have slipped into the code. From your description I wonder if you lock the mutex in line 2 from the correct context (a Xenomai thread). If you call that lock from main, don't forget to invoke rt_task_shadow first. Jan
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Adeos-main mailing list [email protected] https://mail.gna.org/listinfo/adeos-main
