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

Re: code for retrieving system time in a device driver



In message <d67653f604081013022d4aad48@mail.gmail.com> you wrote:
> 
> i have been trying to modify a device driver. I want to write a code
> to retrieve the system date and time. My code runs fine as a normal c
> program but it does not even compile when I insert the same in a
> device driver.
> Can you tell me whats wrong?

You cannot call standard C library functions in kernel code.

You can only use functions provided by the kernel. See
Documentation/DocBook/kernel-api

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
I object to intellect without discipline;  I object to power without
constructive purpose.
	-- Spock, "The Squire of Gothos", stardate 2124.5



Reply to: