The TTI PD callback can update the ETB and operational train topology counters by calling tlc_setETBTopoCount() and tlc_setOpTrainTopoCount().
These functions acquire the TRDP session mutex while the callback is executed from the PD receive path. Other TRDP processing can acquire the same locks in the opposite order, creating a lock-order inversion and a possible deadlock.
The topology update path should avoid nested mutex acquisition in an incompatible order while preserving thread-safe access to the topology counters.