函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\relay.c Create Date:2022-07-27 12:52:04
Last Modify:2020-03-17 19:20:22 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:lay_close - close the channel*@chan: the channel* Closes all channel buffers and frees the channel.

函数原型:void relay_close(struct rchan *chan)

返回类型:void

参数:

类型参数名称
struct rchan *chan
839  如果非chan则返回
842  mutex_lock( & list of open channels, for cpu hotplug )
843  如果 One global buffer ? buf等于per_cpu_ptr( per-cpu channel buffers , 0)则lay_close_buf - close a channel buffer*@buf: channel buffer* Marks the buffer finalized and restores the default callbacks.* The channel buffer and channel buffer data structure are then freed* automatically when the last reference is given up.
845  否则遍历可用CPU(i)
847  如果buf等于per_cpu_ptr( per-cpu channel buffers , i)则lay_close_buf - close a channel buffer*@buf: channel buffer* Marks the buffer finalized and restores the default callbacks.* The channel buffer and channel buffer data structure are then freed* automatically when the last reference is given up.
850  如果 tried to log event > subbuf size printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
855  删除链表项
856  kref_put - decrement refcount for object.*@kref: object.*@release: pointer to the function that will clean up the object when the* last reference to the object is released.* This pointer is required, and it is not acceptable to pass kfree
857  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.