pthread compat