Make timeout(0) wait until write mask is cleared