pthreads: stack support