Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jan 2003 12:49:13 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Poul-Henning Kamp <phk@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/fs/fifofs fifo_vnops.c
Message-ID:  <20030102204913.GM26140@elvis.mu.org>
In-Reply-To: <200301021951.h02Jp8Ys002016@repoman.freebsd.org>
References:  <200301021951.h02Jp8Ys002016@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Poul-Henning Kamp <phk@FreeBSD.org> [030102 11:51] wrote:
> phk         2003/01/02 11:51:08 PST
> 
>   Modified files:        (Branch: RELENG_5_0)
>     sys/fs/fifofs        fifo_vnops.c 
>   Log:
>   MFC: Put a one-second timeout (And a XXX: comment) on a tsleep which
>   under certain not understood circumstances hangs sendmail during
>   boot.

    216         if (ap->a_mode & FWRITE) {
    217                 fip->fi_writers++;
    218                 if (fip->fi_writers == 1) {
    219                         fip->fi_readsock->so_state &= ~SS_CANTRCVMORE;
    220                         if (fip->fi_readers > 0) {
    221                                 wakeup((caddr_t)&fip->fi_readers);
    222                                 sorwakeup(fip->fi_writesock);
    223                         }
    224                 }
    225         }

This this code is confusing because we have a producer consumer
relationship between readers and writers.  I think that the problem
is that in this section of code the wakeup should be on fi_writers.

Please test that and let me know if it fixes the problem.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030102204913.GM26140>