From-SVN: r183758
Calls to library functions now use entersyscall and exitsyscall as appropriate. This is a first step toward multiplexing goroutines onto threads. From-SVN: r180345