Protothreads from http://dunkels.com/adam/pt/