08-03-2010 02:29 AM
Hello to all,
Is there any examples on how to use the XPS_MUTEX ? I read the XAP996, but I don't understand a thing: how does the mutex know which the shared resource is and how to use a XPS_MUTEX to control more then one shared resources.
In XAPP996 example one XPS_MUTEX control the access to the shared RS232_1 UART. Is there possible to use the same XPS_MUTEX to control the access to another resourse (let's say GPIO LEDs) ? How does the mutex know witch one of the shared resources should be controlled ?
10-05-2010 04:39 AM
I'd like a few more details on the XPS_Mutex. The documentation says
"Only one interface at the time can access any of the mutexes, i.e. all other PLB interfaces are blocked while one is accessing any of the mutexes."
How does this work if one interface is waiting for another to release the lock? I assume it must still be possible for one interface to slip in its write (unlock) between each write/read (lock attempt) on another interface?
How about if one interface has multiple threads accessing the different mutexes in the mutex core. Can all those occur safely? They should all be accessing independent memory, but it would be nice to know for sure.