Function report |
Source Code:fs\eventfd.c |
Create Date:2022-07-28 20:20:13 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:eventfd_read
Proto:static ssize_t eventfd_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file | |
| char __user * | buf | |
| size_t | count | |
| loff_t * | ppos |
| 224 | ucnt = 0 |
| 230 | spin_lock_irq( & lock) |
| 234 | Else if Not (f_flags & O_NONBLOCK) Then |
| 235 | __add_wait_queue( & wqh, & wait) |
| 236 | cycle |
| 242 | If signal_pending(current process) Then |
| 244 | Break |
| 246 | spin_unlock_irq( & lock) |
| 247 | schedule() |
| 248 | spin_lock_irq( & lock) |
| 250 | __remove_wait_queue( & wqh, & wait) |
| 253 | If Value is more likely to compile time(res > 0) Then |
| 254 | eventfd_ctx_do_read(ctx, & ucnt) |
| 258 | spin_unlock_irq( & lock) |
| 260 | If res > 0 && Write a simple value into user space(ucnt, (__u64__user * )buf) Then Return -EFAULT |
| 263 | Return res |
| 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 |