[En-Nut-Discussion] Another set of eyes
Ralph Mason
ralph.mason at telogis.com
Mon Jul 21 10:38:04 CEST 2003
I am looking for a seconds set of eyes on some code. And to make a
contribution.
I have written a message que for NutOS to allow a thread to wait on multiple
objects and make IPC easier.
I have been over the code again and again, it appears to work perfectly on
the PC but when it runs on the hardware I get random stopping of threads
(not involved with the que) they show as ready to run and they have the run
que as the queue. eg
0000312F cli 64 RUN 00000C6B 00000000 0000E709 4294948314 CR 312F
1301
0000310C Leds 20 RDY 00000C6B 00000000 000030F1 357 OK 312F 1301
00002F69 Power 64 SLP 00000000 00006DCB 00002F4E 357 OK
00001301 idle 254 RDY 00000C6B 00000000 000012E9 360 OK 312F 1301
Ignore the thread that says it's corrupted (it's running in paged space so
without changing the thread dump function it cant access its stack. It *is*
fine.
But the interesting thing is here the Leds thread has stopped running. It
shows as ready and *thinks* it's in the run queue, but doesn't show there.
The code I am using with the Message Que has 2 threads, one lower priority
that reads from a com port to a buffer on it's stack, one with a higher
priority that reads the message que and processes the data from the other
thread. Because the higher priority thread will never yield the lower
priority thread can use a single buffer.
Everything else seems totally fine, if I don't use the message que then it
works fine.
Any help or thoughts are very welcomed.
Thanks
Ralph
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MessageQ.c
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20030721/b41b6ed6/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: MessageQ.h
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20030721/b41b6ed6/attachment.h>
More information about the En-Nut-Discussion
mailing list