Implement thread-related runtime support routines.
Implement thread-related runtime support routines.

Change-Id: Idb6165ba4525293b5ac8d65a5f37240ef6bc3483

treadstoneproject/artinst,treadstoneproject/artinst,treadstoneproject/artinst,treadstoneproject/artinst,treadstoneproject/artinst