| 函数逻辑报告 | 
| Source Code: kernel\time\posix-timers.c | Create Date:2022-07-27 11:46:22 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Create a POSIX.1b interval timer.
函数原型:static int do_timer_create(clockid_t which_clock, struct sigevent *event, timer_t __user *created_timer_id)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| clockid_t | which_clock | |
| struct sigevent * | event | |
| timer_t __user * | created_timer_id | 
| 475 | kc等于clockid_to_kclock(which_clock) | 
| 478 | it_id_set等于IT_ID_NOT_SET | 
| 482 | 如果非timer_create则返回:负EOPNOTSUPP | 
| 485 | new_timer等于alloc_posix_timer() | 
| 486 | 如果此条件成立可能性小(为编译器优化)(!new_timer)则返回:负EAGAIN | 
| 489 | spin_lock_init( & it_lock) | 
| 491 | 如果new_timer_id小于0则 | 
| 492 | error等于new_timer_id | 
| 493 | 转到:out | 
| 497 | it_id等于new_timer_id | 
| 498 | it_clock等于which_clock | 
| 500 | it_overrun等于负1LL | 
| 502 | 如果event则 | 
| 504 | it_pid等于get_pid(good_sigevent(event)) | 
| 506 | 如果非it_pid则 | 
| 511 | si_signo等于sigev_signo | 
| 512 | si_value等于sigev_value | 
| 513 | 否则 | 
| 524 | 如果copy_to_user(created_timer_id, & new_timer_id, new_timer_id的长度)则 | 
| 530 | error等于timer_create(new_timer) | 
| 534 | spin_lock_irq( & siglock) | 
| 536 | 添加链表项 | 
| 537 | spin_unlock_irq( & siglock) | 
| 539 | 返回:0 | 
| 546 | out : | 
| 548 | 返回:error | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |