DragonFly BSD
DragonFly submit List (threaded) for 2004-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: lwkt_msgport.c


From: esmith <esmith@xxxxxxxxxxxx>
Date: Thu, 01 Jan 2004 06:46:13 -0500

Matthew Dillon wrote:
:It appears, on line 371 of lwkt_msgport.c, function :lwkt_default_waitport, that there is a call to enter a critical section :which might be unnecessary because it already exists within a critical :section.

    Hmm.  I think you also found a bug.  It looks like there are two calls
    to crit_enter() in that procedure and only one call to crit_exit().  So
    not only is there an unnecessary crit_enter(), but the critical section
    is not properly unwound either.

I'll remove the crit_enter() on line 371, test, and commit. Thanks!

-Matt
Matthew Dillon <dillon@xxxxxxxxxxxxx>

I'm glad I could return something for the questions you've answered for me. Hopefully, I'll contribute more.


I noticed the lack of the exit before I submitted, however, I'll be honest, at the time I submitted this I hadn't read enough code ( almost none ) to know if that was allowable. I decided at best the extra crit_enter was unnecessary, and at worst it was a bug ( due to lack of a matching crit_exit ). I was confident that people on this list would notice and tell me either way.

I'm pleased I squeaked in one worthy submission during 2003.

To Matt and everyone who reads this list, Happy New Year!

- Erik Smith




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]