函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__ptr_ring_swap_queue

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

返回类型:void

参数:

类型参数名称
struct ptr_ring *r
void **queue
intsize
gfp_tgfp
void (*destroy
561  producer等于0
565 ptr等于__ptr_ring_consume(r)循环
566  如果producer小于sizequeue[producer++]等于ptr
568  否则如果destroydestroy(ptr)
571  如果producer大于等于sizeproducer等于0
573  __ptr_ring_set_size(r, size)
574  producer等于producer
575  consumer_head等于0
576  next entry to invalidate 等于0
577  old等于queue
578  queue等于queue
580  返回:old
调用者
名称描述
ptr_ring_resizeNote: 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.
ptr_ring_resize_multipleNote: 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.