Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2000 02:08:45 -0700
From:      Alfred Perlstein <bright@wintelcom.net>
To:        "G.B.Naidu" <gbnaidu@sasi.com>
Cc:        freebsd-net@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: How do I time in kernel...
Message-ID:  <20000529020845.U28594@fw.wintelcom.net>
In-Reply-To: <Pine.LNX.4.21.0005291300270.775-100000@pcd75.sasi.com>; from gbnaidu@sasi.com on Mon, May 29, 2000 at 01:04:45PM %2B0530
References:  <Pine.LNX.4.21.0005291300270.775-100000@pcd75.sasi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* G.B.Naidu <gbnaidu@sasi.com> [000529 01:13] wrote:
> 
> Hi,
> 
> I would like to know how to get time of the day in side kernel. When I
> used gettimeofday() in side kernel, it was giving panic on 3.3 FreeBSD
> release. It didnt panic on 3.1-RELEASE. So what is the problem?
> 
> Can I use gettimeofday() inside kernel? if so why 3.3 is panicking? Ifnot
> why 3.1 is not panicking?
> 
> Next question is how can I achieve the equal functionality of
> gettimeofday() call in kernel? Is there anyway?
> 
> One more question: Is it wrong to call system call from kernel files?

It depends on how you call it, look at the sendfile implementation and
see how it has to call writev(), userland_writev() != kernel_writev(),
you need to munge with the arguements.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000529020845.U28594>