函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\ptr_ring.h Create Date:2022-07-27 14:41:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Note: producer lock is nested within consumer lock, so if you* resize you must make sure all uses nest correctly.* In particular if you consume ring in interrupt or BH context, you must* disable interrupts/BH when doing so.

函数原型:static inline int ptr_ring_resize(struct ptr_ring *r, int size, gfp_t gfp, void (*destroy)(void *))

返回类型:int

参数:

类型参数名称
struct ptr_ring *r
intsize
gfp_tgfp
void (*destroy
593  queue等于Not all gfp_t flags (besides GFP_KERNEL) are allowed. See* documentation for vmalloc for which of them are legal.
596  如果非queue则返回:负ENOMEM
599  spin_lock_irqsave( & consumer_lock, flags)
600  加自旋锁
602  old等于__ptr_ring_swap_queue(r, queue, size, gfp, destroy)
604  自旋锁解锁
605  spin_unlock_irqrestore( & consumer_lock, flags)
607  kvfree(old)
609  返回:0