/*
 * call-seq:
 *      mq << string => mq
 *
 * Inserts the given +string+ into the message queue with a
 * default priority of 0 and no timeout.
 *
 * Returns itself so its calls may be chained.  This use is only
 * recommended only for users who expect blocking behavior from
 * the queue.
 */
static VALUE send0(VALUE self, VALUE buffer)
{
        struct posix_mq *mq = get(self, 1);
        struct rw_args x;

        setup_send_buffer(&x, buffer);
        x.des = mq->des;
        x.timeout = NULL;
        x.msg_prio = 0;

retry:
        WITHOUT_GVL(xsend, &x, RUBY_UBF_IO, 0);
        if (x.retval < 0) {
                if (errno == EINTR)
                        goto retry;
                rb_sys_fail("mq_send");
        }

        return self;
}