函数逻辑报告 |
Source Code:kernel\time\posix-cpu-timers.c |
Create Date:2022-07-27 11:47:44 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Guts of sys_timer_settime for CPU timers.* This is called with the timer locked and interrupts disabled.* If we return TIMER_RETRY, it's necessary to release the timer's lock* and try again. (This happens when the timer is in the middle of firing.)
函数原型:static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags, struct itimerspec64 *new, struct itimerspec64 *old)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct k_itimer * | timer | |
int | timer_flags | |
struct itimerspec64 * | new | |
struct itimerspec64 * | old |
564 | clkid等于CPUCLOCK_WHICH(it_clock) |
570 | ret等于0 |
572 | 如果WARN_ON_ONCE(!p)则返回:负EINVAL |
585 | sighand等于lock_task_sighand(p, & flags) |
590 | 如果此条件成立可能性小(为编译器优化)(sighand == NULL)则返回:负ESRCH |
596 | old_incr等于it_interval |
599 | 如果此条件成立可能性小(为编译器优化)(firing)则 |
600 | firing等于负1 |
602 | 否则 |
603 | cpu_timer_dequeue(ctmr) |
614 | 如果CPUCLOCK_PERTHREAD(it_clock)则val等于Sample a per-thread clock for the given task. clkid is validated. |
619 | 如果old则 |
620 | 如果old_expires恒等于0则 |
621 | seconds 等于0 |
622 | nanoseconds 等于0 |
623 | 否则 |
631 | exp等于Update expiry time from increment, and increase overrun count,* given the current clock sample. |
634 | old_expires等于exp减val |
636 | 否则 |
637 | nanoseconds 等于1 |
638 | seconds 等于0 |
643 | 如果此条件成立可能性小(为编译器优化)(ret)则 |
650 | unlock_task_sighand(p, & flags) |
651 | 转到:out |
655 | new_expires加等于val |
664 | 如果new_expires不等于0且val小于new_expires则 |
668 | unlock_task_sighand(p, & flags) |
680 | it_requeue_pending等于it_requeue_pending加2按位与REQUEUE_PENDING的反 |
682 | it_overrun_last等于0 |
683 | it_overrun等于负1 |
685 | 如果new_expires不等于0且非val小于new_expires的值则 |
694 | ret等于0 |
695 | out : |
696 | 如果old则it_interval等于纳秒转换到64位timespec时间 |
699 | 返回:ret |
名称 | 描述 |
---|---|
do_cpu_nanosleep |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |