goto retry;
continue;
PRInt32 _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount,                            PRInt32 flags, PRIntervalTime timeout){    PRInt32 osfd = fd->secret->md.osfd;    PRInt32 rv, err;    PRThread *me = _PR_MD_CURRENT_THREAD();#if defined(SOLARIS)	PRInt32 tmp_amount = amount;#endif    /*     * On pre-2.6 Solaris, send() is much slower than write().     * On 2.6 and beyond, with in-kernel sockets, send() and     * write() are fairly equivalent in performance.     */#if defined(SOLARIS)retry:    PR_ASSERT(0 == flags);    while ((rv = write(osfd,buf,tmp_amount)) == -1) {#else    while ((rv = send(osfd,buf,amount,flags)) == -1) {#endif        err = _MD_ERRNO();        if ((err == EAGAIN) || (err == EWOULDBLOCK))    {            if (fd->secret->nonblocking) {                break;            }            if (!_PR_IS_NATIVE_THREAD(me)) {                if ((rv = local_io_wait(osfd, _PR_UNIX_POLL_WRITE, timeout)) < 0)                    goto done;            } else {                if ((rv = socket_io_wait(osfd, WRITE_FD, timeout))< 0)                    goto done;            }        } else if ((err == EINTR) && (!_PR_PENDING_INTERRUPT(me))){            continue;        } else {#if defined(SOLARIS)			/*			 * The write system call has been reported to return the ERANGE			 * error on occasion. Try to write in smaller chunks to workaround			 * this bug.			 */			if (err == ERANGE) {				if (tmp_amount > 1) {					tmp_amount = tmp_amount/2;	/* half the bytes */					goto retry;				}			}#endif            break;        }    }        /*         * optimization; if bytes sent is less than "amount" call         * select before returning. This is because it is likely that         * the next send() call will return EWOULDBLOCK.         */    if ((!fd->secret->nonblocking) && (rv > 0) && (rv < amount)            && (timeout != PR_INTERVAL_NO_WAIT)) {        if (_PR_IS_NATIVE_THREAD(me)) {			if (socket_io_wait(osfd, WRITE_FD, timeout)< 0) {				rv = -1;				goto done;			}        } else {			if (local_io_wait(osfd, _PR_UNIX_POLL_WRITE, timeout) < 0) {				rv = -1;				goto done;			}        }    }    if (rv < 0) {        _PR_MD_MAP_SEND_ERROR(err);    }done:    return(rv);}