This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: help in tcp/ip stack !!!


wangwei wrote:
> 
> Hi,all
> help me !!
> I make a tcp server in ecos. when client connect with it , appliaction
> dynamically create a thread to communicate with client.
> the client is running in linux, and can be run in background .
> At normal, the server can running stably.
> When I make a shell to run lots of client program in background,more than 30
> clients,the server in ecos give "EXH 4" error.
> In this application, My memory in ecos is more than 3M ,there is enough
> memory for malloc. And when thread which run server program is ended, the
> memory it used can be free .So I think memory cann't cause this problem.
> 
> I had met the "EXH 4" error before . When I try ipaq nanox package in ecos ,
> it call nanosleep() in a no posix thread , and cause a "EXH 4" error.
> so I suspect it is caused by the same reason .but I can't find out .

That means you got an exception.

I had a quick look at your code and I believe the problem is that you are
using cyg_thread_kill() and then freeing the threads memory. You almost
certainly want to use cyg_thread_delete() instead.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]