Various extensions to the base thread library.