Function report |
Source Code:lib\percpu-refcount.c |
Create Date:2022-07-28 06:24:48 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:percpu_ref_init - initialize a percpu refcount*@ref: percpu_ref to initialize*@release: function which will be called when refcount hits 0*@flags: PERCPU_REF_INIT_* flags*@gfp: allocation mask to use* Initializes @ref
Proto:int percpu_ref_init(struct percpu_ref *ref, percpu_ref_func_t *release, unsigned int flags, gfp_t gfp)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct percpu_ref * | ref | |
percpu_ref_func_t * | release | |
unsigned int | flags | |
gfp_t | gfp |
63 | align = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, 1 << __PERCPU_REF_FLAG_BITS, __alignof__(unsignedlong)) |
65 | start_count = 0 |
67 | * The low bit of the pointer indicates whether the ref is in percpu * mode; if set, then get/put will manipulate the atomic_t. = __alloc_percpu_gfp(sizeof(unsignedlong), align, gfp) |
69 | If Not * The low bit of the pointer indicates whether the ref is in percpu * mode; if set, then get/put will manipulate the atomic_t. Then Return -ENOMEM |
75 | If flags & (PERCPU_REF_INIT_ATOMIC | PERCPU_REF_INIT_DEAD) Then |
76 | * The low bit of the pointer indicates whether the ref is in percpu * mode; if set, then get/put will manipulate the atomic_t. |= __PERCPU_REF_ATOMIC |
77 | allow_reinit = true |
78 | Else |
82 | If flags & PERCPU_REF_INIT_DEAD Then * The low bit of the pointer indicates whether the ref is in percpu * mode; if set, then get/put will manipulate the atomic_t. |= __PERCPU_REF_DEAD |
84 | Else start_count++ |
87 | atomic_long_set( & count, start_count) |
90 | confirm_switch = NULL |
91 | Return 0 |
Name | Describe |
---|---|
css_create | |
cgroup_create | The returned cgroup is fully initialized including its control mask, but* it isn't associated with its kernfs_node and doesn't have the control* mask applied. |
cgroup_bpf_inherit | group_bpf_inherit() - inherit effective programs from parent*@cgrp: the cgroup to modify |
blkg_alloc | lkg_alloc - allocate a blkg*@blkcg: block cgroup the new blkg is associated with*@q: request_queue the new blkg is associated with*@gfp_mask: allocation mask to use* Allocate a new blkg assocating @blkcg and @q. |
ioctx_alloc | x_alloc* Allocates and initializes an ioctx. Returns an ERR_PTR if it failed. |
io_ring_ctx_alloc | |
hd_ref_init |
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 |