...
Use entry-/exit-actions instead of actions on transitions, if possible.
If using hostcode, only use functions delivered by our own C-Interface and not the Höhrmann-API.
Mutual Exclusion
bool <track>_req[trainAmount] contains the requests for each track and train. Before the availability of arrays, we used bool <train>_<track>_req.
int <track>_perm contains the trainnumber of the train, who is allowed to drive on <track>.