Function report |
Source Code:fs\pipe.c |
Create Date:2022-07-28 20:04:29 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alloc_pipe_info
Proto:struct pipe_inode_info *alloc_pipe_info(void)
Type:struct pipe_inode_info
Parameter:Nothing
766 | pipe_bufs = PIPE_DEF_BUFFERS |
767 | user = get_current_user - Get the current task's user_struct* Get the user record of the current task, pinning it so that it can't go* away.() |
769 | max_size = READ_ONCE(The max size that a non-root user is allowed to grow the pipe. Can* be set by root in /proc/sys/fs/pipe-max-size) |
771 | pipe = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
772 | If (pipe == NULL) Then Go to out_free_uid |
775 | If pipe_bufs * PAGE_SIZE > max_size && Not Check operation authority Then pipe_bufs = max_size >> PAGE_SHIFT determines the page size |
778 | user_bufs = account_pipe_buffers(user, 0, pipe_bufs) |
780 | If too_many_pipe_buffers_soft(user_bufs) && is_unprivileged_user() Then |
781 | user_bufs = account_pipe_buffers(user, pipe_bufs, 1) |
782 | pipe_bufs = 1 |
785 | If too_many_pipe_buffers_hard(user_bufs) && is_unprivileged_user() Then Go to out_revert_acct |
788 | 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). |
791 | If bufs Then |
792 | init_waitqueue_head( & wait) |
797 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & mutex) |
798 | Return pipe |
801 | out_revert_acct : |
802 | account_pipe_buffers(user, pipe_bufs, 0) |
804 | out_free_uid : |
806 | Return NULL |
Name | Describe |
---|---|
get_pipe_inode | |
fifo_open | |
splice_direct_to_actor | splice_direct_to_actor - splices data directly between two non-pipes*@in: file to splice from*@sd: actor information on where to splice to*@actor: handles the data splicing* Description:* This is a special case helper to splice directly between two |
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 |