[En-Nut-Discussion] Basemon bug ?

Ernst Stippl ernst at stippl.org
Sun Dec 17 21:20:40 CET 2006


Hi Pascal!

I have not gone into details of your theory because thread handling is a
part of Nut/OS which I dont understand very well yet. But I am impressed by
the way you document your findings!

I looked into the sources of NutThreadRemoveQueue (thread.c) in Nut/OS 3.9.5
and 4.2.1 and there are differences. But these functions are used by Nut/OS
whenever it is running, and I dont know what basemon is doing differently
than  Nut/OS so that NutThreadRemoveQueue may act differenctly in these two
situations.

I will try to load basemon into my Ethernut 2.1 board to see how it works...

regards
ernst

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von Pascal Jean
Gesendet: Samstag, 16. Dezember 2006 23:08
An: 'Ethernut User Chat (English)'
Betreff: Re: [En-Nut-Discussion] Basemon bug ?

Hi,

I think of having found the problem but I don't know the reason of it.

The error occurs in the call of NutRegisterDevice(&devEth0, 0x8300, 5) in
the thread 'main'
The commutation of task takes place well toward the thread 'rxi5', but in
the call  of NutThreadSetPriority(9), the deletion of the thread under
execution happens badly.
In the call of NutThreadRemoveQueue(runningThread, &runQueue), a while loop
is used to search for the thread to remove. Gold in this case, the thread to
remove is the first (normal it is in progress the one). Once the done
deletion, an instruction break must normally interrupt the while loop.
And well it is not what happens!!! It removes other thread (of which him
'idle' !!!)

I achieved you a small animation flash for you show:
http://epsilnx.free.fr/doc/bug.html

What do you think of it?

Regards
Pascal


_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.18/584 - Release Date: 12.12.2006



-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.22/590 - Release Date: 16.12.2006





More information about the En-Nut-Discussion mailing list