Embedded OS kernel with pthread API running on Atmel AVR