What's "MSG"? root ([EMAIL PROTECTED]) wrote: > Hi all > > I have a problem with the funktion nanosleep. > I am making a RT-linux kernel module and use teh funktion nanosleep, to > sleep for about 1e5 to 5e5 nanoSec. > > Sometimes it goes wrong. I recive a "segmentation fault" in my userspace > app. There is a rtl fifo between user/kernel space. > with sometimes i meen : I can write a number between 1 to 5000 times > before it goes wrong. > loged message in kernel (a small bit of it): > > May 16 13:07:36 xterm39 kernel: TEST :handler_rs0 > May 16 13:07:36 xterm39 kernel: TEST :recived 2 4 2 4 > May 16 13:07:36 xterm39 kernel: TEST :writing rest > May 16 13:07:36 xterm39 kernel: TEST :reciving > May 16 13:07:36 xterm39 kernel: TEST :have devided > May 16 13:07:36 xterm39 kernel: divide error: 0000 > May 16 13:07:36 xterm39 kernel: CPU: 0 > > this is some of the code : > /* delay before first char */ > delay = (long) one_char * wait[0]; > time_delay.tv_sec = 0; /* delay/one_sec; */ > time_delay.tv_nsec = delay; /* % one_sec; */ > MSG("have devided\n"); > nanosleep(&time_delay,&time_delay); > MSG("have devided 2 \n"); <- I newer recive this > ************, well mest of the times, but not after the devide error. > > I have included this header files > #include <linux/errno.h> > #include <rtl.h> > #include <time.h> > #include <rtl_time.h> > #include <rtl_sched.h> > #include <rtl_fifo.h> > #include <pthread.h> > > Could any please tell me what is wrong . > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] > -- > For more information on Real-Time Linux see: > http://www.rtlinux.org/rtlinux/ -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/