linux内核常用数据结构和函数解释
2013-12-24 22:51
190 查看
1.struct hrtimer:高精度定时器
/*相对于monotonic 时钟基准的偏移量*/};
struct hrtimer { struct timerqueue_node node; ktime_t _softexpires; enum hrtimer_restart (*function)(struct hrtimer *); struct hrtimer_clock_base *base; unsigned long state; #ifdef CONFIG_TIMER_STATS int start_pid; void *start_site; char start_comm[16]; #endif };
<1>参考链接:Linux hrtimer分析(一):/article/7833624.html
2.struct hrtimer_cpu_base:单个CPU的高精度时钟struct hrtimer_cpu_base { raw_spinlock_t lock; /*自旋锁*/ unsigned int active_bases; unsigned int clock_was_set; #ifdef CONFIG_HIGH_RES_TIMERS ktime_t expires_next; int hres_active; int hang_detected; unsigned long nr_events; unsigned long nr_retries; unsigned long nr_hangs; ktime_t max_hang_time; #endif struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; /*时钟源*/ };3. struct hrtimer_clock_base:时钟源
struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base; int index; /*时钟源类型:CLOCK_REALTIME和CLOCK_MONOTONIC CLOCK_REALTIME:用户更改系统时间,会受到影响 CLOCK_MONOTONIC:用户更改系统时间,不会受到影响*/clockid_t clockid; /*时钟编号*/struct timerqueue_head active; /*激活的高精度时钟红黑树*/ktime_t resolution; /*时钟的精度,ns单位*/ktime_t (*get_time)(void); /*获取当前时钟时间的函数指针*/ktime_t softirq_time; /*在软中断中运行时钟的时刻*/ktime_t offset;
/*相对于monotonic 时钟基准的偏移量*/};
相关文章推荐
- linux 内核源代码情景分析——几个重要的数据结构和函数
- Linux内核常用数据结构和操作
- 常用内核中断符号解释—linux
- linux 内核(驱动)常用函数
- Linux内核常用数据结构要点
- linux 下epoll与线程池结合使用的简单实例(含常用函数解释)
- linux 内核(驱动)常用函数
- linux 内核中常用的数据结构
- 【Linux网络内核】常用函数总结
- Linux网络编程之[Socket通信的常用函数简介]
- unix/Linux常用命令英文全称与中文解释 man ,su,ps,ls 等等
- linux内核中等待队列 (函数wait_event与wake_up)
- 【Linux 内核网络协议栈源码剖析】connect 函数剖析(一)
- linux 用户空间和内核空间延时函数
- Linux常用命令英文全称与中文解释Linux系统
- linux内核常用启动参数
- driver: linux2.6 内核模块导出函数实例(EXPORT_SYMBOL) 【转】
- 内核开发知识第一讲.内核中的数据类型.重要数据结构.常用内核API函数.
- Linux网络编程常用函数
- Linux 常用 性能 检测 命令 解释