_mpipe_alloc_locked
buf = _mpipe_alloc_locked(mpipe, 0);
while ((buf = _mpipe_alloc_locked(mpipe, mfailed)) == NULL) {