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

BOUNCE rtl@rtlinux.org: Approval required: (fwd)



>From owner-rtl Thu May 17 04:11:56 2001
Received: from hq.fsmlabs.com (localhost [[UNIX: localhost]])
	by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f4HABs916773
	for <rtl@rtlinux.org>; Thu, 17 May 2001 04:11:54 -0600
Received: (qmail 8706 invoked by uid 1000); 17 May 2001 07:08:09 -0000
Date: Thu, 17 May 2001 11:08:09 +0400
From: Michael Barabanov <baraban@fsmlabs.com>
To: root <agn@city.dk>
Cc: rtlinux <rtl@rtlinux.org>
Subject: Re: [rtl] nanosleep()
Message-ID: <20010517110809.A8670@fsmlabs.com>
References: <3B02630E.D69543A3@city.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.17i
In-Reply-To: <3B02630E.D69543A3@city.dk>; from agn@city.dk on Wed, May 16, 2001 at 01:22:54PM +0200
Organization: FSMLabs

What's "MSG"?

root (agn@city.dk) 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 majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/