This should probably be 'readFromNonRT()' since it doesn't to realtime safe locking.

You should probably lock the mutex at the entry to the function since otherwise it's possible for the state to change between when new_data_available is read and when you lock the mutex.