Function report |
Source Code:kernel\time\posix-cpu-timers.c |
Create Date:2022-07-28 10:48:15 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:do_cpu_nanosleep
Proto:static int do_cpu_nanosleep(const clockid_t which_clock, int flags, const struct timespec64 *rqtp)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| const clockid_t | which_clock | |
| int | flags | |
| const struct timespec64 * | rqtp |
| 1231 | Process spin lock initialization( & it_lock) |
| 1232 | it_clock = which_clock |
| 1233 | it_overrun = -1 |
| 1235 | it_process = current process |
| 1237 | If Not error Then |
| 1244 | spin_lock_irq( & it_lock) |
| 1246 | If error Then |
| 1247 | spin_unlock_irq( & it_lock) |
| 1248 | Return error |
| 1251 | When Not signal_pending(current process) cycle |
| 1252 | If Not cpu_timer_getexpires( & cpu) Then |
| 1258 | spin_unlock_irq( & it_lock) |
| 1259 | Return 0 |
| 1266 | spin_unlock_irq( & it_lock) |
| 1267 | schedule() |
| 1268 | spin_lock_irq( & it_lock) |
| 1274 | expires = cpu_timer_getexpires( & cpu) |
| 1276 | If Not error Then |
| 1282 | spin_unlock_irq( & it_lock) |
| 1284 | When error == SPDX-License-Identifier: GPL-2.0 cycle |
| 1290 | spin_lock_irq( & it_lock) |
| 1292 | spin_unlock_irq( & it_lock) |
| 1295 | If ( seconds | nanoseconds ) == 0 Then |
| 1299 | Return 0 |
| 1306 | restart = restart_block |
| 1312 | Return error |
| Name | Describe |
|---|---|
| posix_cpu_nsleep | |
| posix_cpu_nsleep_restart |
| 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 |