[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rtl] Bug???



On Thu, May 24, 2001 at 12:00:29AM +0800, George Doukas wrote:
> I wrote this simple module for RTLinux...
> 
> #include <rtl.h>
> #include <time.h>
> #include <rtl_sched.h>
> #include <rtl_sync.h>
> 
> pthread_t	thread;
> 
> void * thread_code(void *t) {
> 	int i,j;
> 
> 	for (i=0;i<10;i++) {
> 			for(j=0;j<10;j++) 
> 				rtl_printf("-");
> 		}
> 	
> 	pthread_suspend_np(thread);
> 	return (void *)0;
> }
> 
> int init_module(void) {
> 	pthread_create(&thread,NULL,thread_code,0);
> 	return 0;
> }	
> 
> void cleanup_module(void) {
> 	pthread_delete_np(thread);
> }
> 
> There was no problem runing it.
> 
> But when I changed the second for loop...
> for (i=0;i<10;i++) {
> 	for(j=0;j<1000;j++) 
> 		rtl_printf("-");
> 	}
> I got this message:
> "Aiee, killing interrupt handler
> Kernel panic:Attempted to kill the idle task!
> In interrupt handler - not syncing."
> 
> Why?
> Is there a maximum limit to the time that a RT process is runing?

What version of RTLinux and what compile options?