Basic support for software threads.