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: Peter Kadau <peter.kadau@xxxxxxxxxxxxxxxx>
Date: Thu, 01 Jan 2004 00:56:23 +0100

Hi !

functions does not add very much overhead as its just a value
being incremented by one.
*Taking the teacher's hat*
By 32, not one.
*Dropping the teacher's hat*

#ifdef INVARIANTS
    if (td->td_pri < 0)
        crit_panic();
#endif
As you see here it will overflow at an value of > (mumble)
(munmble could be something like (mumble some power of two minus one))
for an i386 int (quite a way to go I'll admit).

If one were to add a simple print statement into crit_enter()
to print the current value of the nesting depth, you'll find we
are several hundreds deep already.
Fortunately not deeper... ;-)

Cheers and still a
Happy New Year
Peter

--
<peter.kadau@xxxxxxxxxxxxxxxx>

Campus der Max-Planck-Institute Tübingen
Netzwerk- und Systemadministration

Tel: +49 7071 601 598
Fax: +49 7071 601 616




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