Re: DNS library and multi-process

"Kris Ardis" <Kristopher.Ardis-6tN4nzCoH/[email protected]> Thu, 3 Jun 2004 14:23:04 -0500
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <008f01c449a0$31eeb8e0$764000b4@kardis>
Yes, internally the DNS library does use both string functions like strlen()
and formatting functions like sprintf().  These functions are not safe to
use from multiple processes in Keil.  This information will be added to the
DNS documentation for the next update.

Kris

----- Original Message -----
From: "Xavier IZARD" <[email protected]>
To: <tini-6tN4nzCoH/[email protected]>
Sent: Friday, May 28, 2004 11:31 AM
Subject: [TINI]DNS library and multi-process


> Hello,
>
> I use C with keil compiler
>
> I am doing various TCP requests and I am using DNS library, all this at
> the same time using task scheduler library.
> I know that I mustn't call the same DNS function twice at the same time
> and I don't do this. But this library seems to badly support the
> presence of other threads runing at the same time.
>
> The application behaves strangely (often failing the DNS request), and
> generally ends by hanging or rebooting. Removing the call to the
> gethostbyname() function seems to solve the problems.
>
> I know there are some problems with keil function which are not
> reentrant at all, so -- as suggested in a thread on this mailing list --
> each call to these functions is surrounded with a
> task_entercritsection() / task_leavecritsection() in my code.
>
> My question is do you use internaly in the DNS library any keil function
> (like strlen(), ...) which could cause my problems ?
> Any other idea ?
>
> Thanks for your help
>
> Xavier
>
> _______________________________________________
> TINI mailing list
> TINI-6tN4nzCoH/[email protected]
> To UNSUBSCRIBE, edit your profile, or see list archives:
> http://lists.dalsemi.com/mailman/listinfo/tini
>


_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini