Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\ptr_ring.h Create Date:2022-07-28 13:23:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__ptr_ring_swap_queue

Proto:static inline void **__ptr_ring_swap_queue(struct ptr_ring *r, void **queue, int size, gfp_t gfp, void (*destroy)(void *))

Type:void

Parameter:

TypeParameterName
struct ptr_ring *r
void **queue
intsize
gfp_tgfp
void (*destroy
561  producer = 0
565  When ptr = __ptr_ring_consume(r) cycle
566  If producer < size Then queue[producer++] = ptr
568  Else if destroy Then destroy(ptr)
571  If producer >= size Then producer = 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  Return old