| Function report | 
| Source Code: kernel\time\posix-timers.c | Create Date:2022-07-28 10:46:28 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Create a POSIX.1b interval timer.
Proto:static int do_timer_create(clockid_t which_clock, struct sigevent *event, timer_t __user *created_timer_id)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| 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 | If Not timer_create Then Return -EOPNOTSUPP | 
| 485 | new_timer = alloc_posix_timer() | 
| 486 | If Value for the false possibility is greater at compile time(!new_timer) Then Return -EAGAIN | 
| 490 | new_timer_id = posix_timer_add(new_timer) | 
| 491 | If new_timer_id < 0 Then | 
| 492 | error = new_timer_id | 
| 493 | Go to out | 
| 497 | it_id = new_timer_id | 
| 498 | it_clock = which_clock | 
| 500 | it_overrun = -1LL | 
| 502 | If event Then | 
| 504 | it_pid = get_pid(good_sigevent(event)) | 
| 506 | If Not it_pid Then | 
| 510 | it_sigev_notify = sigev_notify | 
| 511 | si_signo = sigev_signo | 
| 512 | si_value = sigev_value | 
| 513 | Else | 
| 518 | it_pid = get_pid(task_tgid(current process)) | 
| 524 | If copy_to_user(created_timer_id, & new_timer_id, size of new_timer_id ) Then | 
| 530 | error = timer_create(new_timer) | 
| 534 | spin_lock_irq( & siglock) | 
| 537 | spin_unlock_irq( & siglock) | 
| 539 | Return 0 | 
| 546 | out : | 
| 548 | Return error | 
| Name | Describe | 
|---|---|
| SYSCALL_DEFINE3 | |
| COMPAT_SYSCALL_DEFINE3 | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |