Added functionality for pthreads, etc