Linux 内核时钟架构之时钟源设备再论read
来源:互联网 发布:720全景源码 编辑:程序博客网 时间:2024/05/30 22:49
对于时钟源设备来说,其最为重要的是在时钟源设备定义中实现一个read函数,此函数用于
读取计数值。
static cycle_t jiffies_read(struct clocksource *cs){ return (cycle_t) jiffies;}
static struct clocksource clocksource_jiffies = { .name = "jiffies", .rating = 1, /* lowest valid rating*/ .read = jiffies_read, .mask = CLOCKSOURCE_MASK(32), .mult = NSEC_PER_JIFFY << JIFFIES_SHIFT, /* details above */ .shift = JIFFIES_SHIFT, .max_cycles = 10,};
/* * .mask MUST be CLOCKSOURCE_MASK(64). See comment above read_tsc() */static struct clocksource clocksource_tsc = { .name = "tsc", .rating = 300, .read = read_tsc, .mask = CLOCKSOURCE_MASK(64), .flags = CLOCK_SOURCE_IS_CONTINUOUS | CLOCK_SOURCE_MUST_VERIFY, .archdata = { .vclock_mode = VCLOCK_TSC },};
static cycle_t read_tsc(struct clocksource *cs){ return (cycle_t)rdtsc_ordered();}
0 0
- Linux 内核时钟架构之时钟源设备再论read
- Linux 内核时钟架构之时钟源设备注册
- Linux 内核时钟架构之时钟源设备SR
- Linux 内核时钟架构之时钟设备描述符
- Linux 内核时钟架构之时钟事件设备注册
- Linux 内核时钟架构之时钟事件设备SYS接口
- Linux 内核时钟架构之时钟事件设备与tick_device
- Linux 内核时钟架构之时钟源描述
- Linux 内核时钟架构之时钟源SYS 接口
- Linux 内核时钟架构之时钟源模块对外接口
- Linux 内核时钟架构之时钟源读取计数
- Linux 内核时钟架构之时钟事件设备和tick_device绑定
- Linux 内核时钟架构之时钟 tick初始化
- Linux设备驱动程序之中断与时钟
- linux设备驱动程序之时钟管理
- Linux 内核时钟之oneshot建立
- Linux 内核时钟之oneshot编程
- Linux 内核时钟之进程时间更新
- java作业调度
- Matplotlib 教程 (转载)
- Linux下搭建SVN
- PB自带工具连接到oracle数据库
- OpenCV实现基于傅里叶变换的旋转文本校正
- Linux 内核时钟架构之时钟源设备再论read
- Android工程师技能表
- Hibernate基础------》映射关系---》one2one
- PHP版微信公众平台搭建与开发(PDF完整版+视频教程+代码)
- 持有对象(容器)——适配器(反向迭代器使用)
- 【解决】Linux下搜狗输入法无法显示候选框
- 七天学会NodeJS
- golang 线程池
- 拾麦子 java蓝桥杯算法省题