SV: [En-Nut-Discussion] cgi functions
Henrik Torstensson
henrik.torstensson at tritech.se
Tue May 24 10:13:55 CEST 2005
Hi,
Thanks Ole. I have been trying to do something like this:
cgifunc(FILE *stream, REQUEST *req)
{
...
MsgQPost(...);
...
SemWait(...);
...
}
THREAD(thread_a, arg)
{
...
MsgQGet(...);
...
SemPost(...);
...
}
But I got some strange behaviours, like the system restarts or hangs. How do
I know if I have run out of memory? Is there any more things to consider?
Thanks for the help.
Henrik
-----Ursprungligt meddelande-----
Från: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de]För Ole Reinhardt
Skickat: den 23 maj 2005 16:28
Till: Ethernut User Chat (English)
Ämne: Re: [En-Nut-Discussion] cgi functions
Hi,
> I have question about cgi functions in Nut/OS. Is the cgi function inside
an
> IRQ? How do I comunicate whith other threads from the cgi function? Is
> NutEventPostAsync(); the only possibility?
For God's sake, no! The CGI function will be called from the httpd
process if you have registered an appropriate cgi. The CGI function is
part of a "normal" process an therfore not executed in the irq context.
You can safely use NutEventPost or NutEventPostAsync whatever you like
better. To communicate with another process you can use message queues
as well...
Bye,
Ole
--
kernel concepts Tel: +49-271-771091-14
Dreisbachstr. 24 Fax: +49-271-771091-19
D-57250 Netphen E+ : +49-177-7420433
--
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
More information about the En-Nut-Discussion
mailing list