lwkt_msgport.c

esmith esmith at patmedia.net
Thu Jan 1 03:46:13 PST 2004


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 at 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






More information about the Submit mailing list