spaces to tabs
only lock mutex for a minimal time to prevent a deadlock, changed real time priority to the highest value