hrtime.h

来自「Linux Kernel 2.6.9 for OMAP1710」· C头文件 代码 · 共 53 行

H
53
字号
/*  * linux/include/asm-arm/arch-omap2/hrtime.h *  * HRT hooks for the TI OMAP2 * * Copyright (C) 2004 Texas Instruments, Inc.  *  * This package is free software; you can redistribute it and/or modify  * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation.  *  * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.  */#ifndef __ASM_ARM_ARCH_OMAP2_HRTIME_H#define __ASM_ARM_ARCH_OMAP2_HRTIME_H#include <linux/timex.h>int schedule_hr_timer_int(unsigned, int);int get_arch_cycles(unsigned);extern int hrtimer_use;#define hr_time_resolution      1000#define arch_cycles_per_jiffy   (CLOCK_TICK_RATE / HZ)#define schedule_jiffies_int(x) (get_arch_cycles(x) >= arch_cycles_per_jiffy)/* These values has to be chosen to aviod both underflow and overflow during * computation * this can be acheived by inputting all the possible values and checking * the result after computation * these values were directly picked from celinux sources for 1510 */#define SC_ARCH2NSEC            23#define SC_NSEC2ARCH            32#define scaled_nsec_per_arch_cycle      \        (SC_n(SC_ARCH2NSEC, NSEC_PER_SEC) / CLOCK_TICK_RATE)#define scaled_arch_cycles_per_nsec     \        (SC_n(SC_NSEC2ARCH, CLOCK_TICK_RATE) / NSEC_PER_SEC)#define arch_cycle_to_nsec(cycles)      \        mpy_sc_n(SC_ARCH2NSEC, (cycles), scaled_nsec_per_arch_cycle)#define nsec_to_arch_cycle(nsec)        \        mpy_sc_n(SC_NSEC2ARCH, (nsec), scaled_arch_cycles_per_nsec)#endif				/* __ASM_ARM_ARCH_OMAP2_HRTIME_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?