AW: [En-Nut-Discussion] Re: AW: AW: Ethernut Docu Improvements

Oliver Schulz olischulz at web.de
Sat Jan 31 13:59:31 CET 2004


Hi Ralph,

> What if you want more than one que per thread?   Is there
> good reason to
> impose an arbitrary limit?
Well, in my opinion there is no sense to have more than one que per thread.
If so, how would you decide from which que the thread takes the next
message? And if the chossen que is empty, the thread is blocked. Meanwhile a
message in another que can arrive and the thread doesn't notice it...
So I think a thread can only "attach" to one que.

But the other case is interessting: Several threads can serve one que. That
is like having some worker threads for special function, that take some
time, but the requests to do these function can arrive faster...

> My implementation doesn't use any memory if you don't use any message
> ques.  Also the developer knows what que size they require so
> allocating
> a que doesn't seem like a hardship to me.   And it seems its
> generaly a
> one que to 3-5 threads average runs in my code.
As Harald also votes for indepandant messages queues, it's probably better
not to tie them to threads.

>
> Sounds like a plan.  Attached is a cleaned up version with
> documentation
> (a little) and Nutized function names.
Thanks. Meanwhile I've fully nutized the files, but no other code change. I
send them to you via private email.

Do you have any problems, if the standard Nut/OS copyright message is put in
the files to commit them into CVS?

Cheers,
Oliver.




More information about the En-Nut-Discussion mailing list