Question about synchronization object
duanwujie
wjduan at linx-info.com
Fri Dec 14 10:14:09 CET 2018
Hi, Phi and Jan:
I have question about synchronization object.Consider under condition.
*
*
*Thread A*
mutex_lock(lock) //O1
...
...
mutex_unlock(lock)//O2
*Thread B*
mutex_lock(lock) //O3
....
....
mutex_unlock(lock);
O1: become xnsynch's owner.
O3: blocked to wait thread A unlock mutex.
O2: this will call sc_cobalt_mutex_unlock syscall then transfer owner
to thread B.
But in the xnsynch_release's "likely condition" seems that
transfer_ownership will not be called. Therefore, how to resume thread B ?
Is there something i misunderstood for xnsynch_fast_release ?
struct xnthread *xnsynch_release(struct xnsynch *synch,
struct xnthread *thread)
{
/* .................................. */
if (likely(xnsynch_fast_release(lockp, threadh)))//This condition
return NULL;
return transfer_ownership(synch, thread);
}
--
*Linx Software Corportaion Sichuan Branch
Name:wujie duan
Tel:028-65182023-6202
E-mail: wjduan at linx-info.com
*
More information about the Xenomai
mailing list