A library of multithreading primitives and routines in ANSI C