Function report |
Source Code:fs\file.c |
Create Date:2022-07-28 20:08: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 files structure and copy contents from the* passed in files structure.* errorp will be valid only when the returned files_struct is NULL.
Proto:struct files_struct *dup_fd(struct files_struct *oldf, int *errorp)
Type:struct files_struct
Parameter:
Type | Parameter | Name |
---|---|---|
struct files_struct * | oldf | |
int * | errorp |
284 | atomic_set( & ad mostly part, 1) |
287 | resize_in_progress = false |
288 | init_waitqueue_head( & resize_wait) |
289 | next_fd = 0 |
291 | max_fds = The default fd array needs to be at least BITS_PER_LONG,* as this is the granularity returned by copy_fdset(). |
293 | open_fds = open_fds_init |
295 | current fd array = fd_array[0] |
298 | old_fdt = files_fdtable(oldf) |
299 | open_files = count_open_files(old_fdt) |
307 | If new_fdt != fdtab Then __free_fdtable(new_fdt) |
310 | new_fdt = alloc_fdtable(open_files - 1) |
311 | If Not new_fdt Then |
313 | Go to out_release |
329 | old_fdt = files_fdtable(oldf) |
330 | open_files = count_open_files(old_fdt) |
335 | old_fds = current fd array |
336 | new_fds = current fd array |
356 | memset(new_fds, 0, (max_fds - open_files) * size of * ) |
360 | Return newf |
362 | out_release : |
364 | out : |
365 | Return NULL |
Name | Describe |
---|---|
unshare_fd | Unshare file descriptor table if it is being shared |
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 |