cthread implementation of memory writes
cthread implementation of memory writes