Function report | 
Source Code:fs\pipe.c | 
Create Date:2022-07-28 20:04:31 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Allocate a new array of pipe buffers and copy the info over. Returns the* pipe size if successful, or return -ERROR on error.
Proto:static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long arg)
Type:long
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct pipe_inode_info * | pipe | |
| unsigned long | arg | 
| 1174 | ret = 0 | 
| 1176 | size = Currently we rely on the pipe array holding a power-of-2 number* of pages. Returns 0 on error. | 
| 1177 | nr_slots = size >> PAGE_SHIFT determines the page size | 
| 1193 | user_bufs = account_pipe_buffers(user, ring_size, nr_slots) | 
| 1195 | If nr_slots > ring_size && (too_many_pipe_buffers_hard(user_bufs) || too_many_pipe_buffers_soft(user_bufs)) && is_unprivileged_user() Then | 
| 1200 | Go to out_revert_acct | 
| 1212 | n = pipe_occupancy - Return number of slots used in the pipe*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer | 
| 1215 | Go to out_revert_acct | 
| 1218 | bufs = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). | 
| 1220 | If Value for the false possibility is greater at compile time(!bufs) Then | 
| 1222 | Go to out_revert_acct | 
| 1229 | If n > 0 Then | 
| 1235 | Else | 
| 1246 | tail = 0 | 
| 1254 | wake_up_interruptible_all( & wait) | 
| 1257 | out_revert_acct : | 
| 1258 | account_pipe_buffers(user, nr_slots, ring_size) | 
| 1259 | Return ret | 
| Name | Describe | 
|---|---|
| pipe_fcntl | 
| 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  |