void ctl_transport_lock(CTL_TRANSPORT_t *self);

ctl_transport_lock acquires the lock mutex of the transport self. If there is no mutex associated with the transport self, ctl_transport_lock returns immediately indicating.

All locks of the transport by ctl_transport_lock must be paired with a call to ctl_transport_unlock to release the lock.


Because mutexes can be locked multiple times, you can use ctl_transport_lock to acquire the transport to issue a sequence of transactions to the transport that cannot be interrupted by another task. However, locking a transport realized by an I2C bus does not guarantee that other masters, in a multi-master system, are excluded from issuing transactions on the I2C bus.

See Also