[ECOS] Interrupt/Ctrl-C problem....

Fabrice Gautier Fabrice_Gautier@sdesigns.com
Fri Nov 10 11:24:00 GMT 2000


To be more precise, i only have the problem when debugging through ethernet.
Serial seems to work fine.

Any idea what could be going on ?

Thanks
-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

> -----Original Message-----
> From: Fabrice Gautier [ mailto:Fabrice_Gautier@sdesigns.com ]
> Sent: Thursday, November 09, 2000 6:54 PM
> To: Ecos-List (E-mail)
> Subject: [ECOS] Interrupt/Ctrl-C problem....
> 
> 
> Hi,
> 
> I almost have a i386 eCos and RedBoot that works perfectly, 
> except for a
> tiny thing.
> 
> The problem can be reproduced with one of my test program joined her.
> 
> The program consist of a main thread and two other threads. 
> Each thread
> printf some string then do a cyg_thread_delay and loop forever.
> 
> I can interrupt the program with ctrl-C a first time, but 
> then I have to
> wait the next output to be able to ctrl-C again. But I don't 
> really know if
> this is the end of a delay or the diag_printf that allows me 
> to interrupt
> again.
> 
> If someone with other archs could test the following test 
> program thank you.
> If this work ok with other arch that would means there is 
> problem left in my
> i386 modifications.
> 
> /*====== hello.c =======*/
> #include <cyg/kernel/kapi.h>
> 
> static char stack1[4096];
> static char stack2[4096];
> static cyg_thread t1;
> static cyg_thread t2;
> 
> void thread1(void *arg)
> {
> 	while(1){
> 		printf("1111_A thread1 here\n");
> 		cyg_thread_delay(777);
> 		printf("1111_B thread1 there\n");
> 		cyg_thread_delay(598);
> 		}	
> }
> 
> void thread2(void *arg)
> {
> 	while(1){
> 		printf("2222_A thread2 here\n");
> 		cyg_thread_delay(547);
> 		printf("2222_B thread2 there\n");
> 		cyg_thread_delay(958);
> 		}			
> }
> 
> void main()
> { 
> 	cyg_handle_t h1,h2;
> 
> 	printf("Hello, world\n");
> 	
> 	cyg_thread_create(10,&thread1,0,"thread1",&stack1,4096,&h1,&t1);
> 	cyg_thread_resume(h1);
> 	cyg_thread_create(10,&thread2,0,"thread2",&stack2,4096,&h2,&t2);
> 	cyg_thread_resume(h2);
> 	
> 	while(1)
> 	{
> 		printf("AA main thread here\n");
> 		cyg_thread_delay(333);
> 		printf("BB main thread there\n");
> 		cyg_thread_delay(1179);
> 	}
> 			
> } //end main
> /*=================*/
> 
> Thank You
> 
> -- 
> Fabrice Gautier
> fabrice_gautier@sdesigns.com 
> 
> 


More information about the Ecos-discuss mailing list