[ECOS] help in tcp/ip stack !!!

wangwei wangw@start.com.cn
Mon Jun 4 18:07:00 GMT 2001


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 .

The program is in attachment . Does anybody read it and help me !!
thanks.
-------------- next part --------------
typedef struct EXTEND_THREAD_PARAM {
	char thread_name[50];
	cyg_handle_t handle;
	void * stack_base;
	void * memp;
	cyg_thread thread_instance;
	void * private;
	} Extend_Thread_Param;
typedef struct CLIENT_DATA{
	int sfd;
	struct sockaddr_in cliaddr;
	} client_data;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcp_test.c
Type: text/x-c
Size: 3859 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20010604/8407af9b/attachment.bin>


More information about the Ecos-discuss mailing list