Implement SDL threads and condition variables (not tested)