[BUG?] Re: maximum value that sched_clock() can return

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

 



On 4/27/06, Mauricio Lin <mauriciolin2000@xxxxxxxxxxxx> wrote:
> Since sched_clock() function is implemented differently for each arch,
> how can I figure out the maximum value sched_clock can return?

This doesn't concern your question, but I was looking at:
sched_clock() defined in arch/i386/kernel/timers/timer_tsc.c:

<definition_sans_comments>
unsigned long long sched_clock(void)
{
        unsigned long long this_offset;
#ifndef CONFIG_NUMA
        if (!use_tsc)
#endif
                return jiffies_64 * (1000000000 / HZ);
        rdtscll(this_offset);
        return cycles_2_ns(this_offset);
}
</definition_sans_comments>

Why do we have the second return statement in the first place? It will
never be executed.

--
./hareesh

--
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