Function report |
Source Code:kernel\relay.c |
Create Date:2022-07-28 11:47:04 |
Last Modify:2020-03-17 19:20:22 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:lay_open - create a new relay channel*@base_filename: base name of files to create, %NULL for buffering only*@parent: dentry of parent directory, %NULL for root directory or buffer*@subbuf_size: size of sub-buffers*@n_subbufs: number of sub-buffers*@cb:
Proto:struct rchan *relay_open(const char *base_filename, struct dentry *parent, size_t subbuf_size, size_t n_subbufs, struct rchan_callbacks *cb, void *private_data)
Type:struct rchan
Parameter:
Type | Parameter | Name |
---|---|---|
const char * | base_filename | |
struct dentry * | parent | |
size_t | subbuf_size | |
size_t | n_subbufs | |
struct rchan_callbacks * | cb | |
void * | private_data |
574 | If Not (subbuf_size && n_subbufs) Then Return NULL |
576 | If subbuf_size > UINT_MAX / n_subbufs Then Return NULL |
579 | chan = 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). |
580 | If Not chan Then Return NULL |
583 | per-cpu channel buffers = alloc_percpu(structrchan_buf * ) |
586 | sub-buffer size = subbuf_size |
587 | total buffer size allocated = align the pointer to the (next) page boundary (subbuf_size * n_subbufs) |
590 | If base_filename Then |
594 | setup_callbacks(chan, cb) |
598 | for_each_online_cpu(i) |
602 | per_cpu_ptr( per-cpu channel buffers , i) = buf |
607 | Return chan |
609 | free_bufs : |
610 | for_each_possible_cpu(i) |
617 | Return NULL |
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 |