POSIX threads to SDL thread migration