posix: add per thread stdio