Re: kernel space

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

 



On Thu, 22 Sep 2005 10:48:24 -0300
sauro <sauro@xxxxxxxxxxx> wrote:
> I would like to get, from userland, the results of a function that is 
> only avaiable from kernel space. (get_cycles, to be exact)
> What is the easiest way to do it? Maybe an ioctl?

Why would you want to use the kernel get_cycles()? It's trivial to
define your own function/macro based on rdtsc:
http://lxr.linux.no/source/include/asm-i386/msr.h#L41

#define rdtscll(val) \
            __asm__ __volatile__ ("rdtsc" : "=A" (val))

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux