A simple kernel and protothread implementation