函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\printk\printk.c Create Date:2022-07-27 11:05:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Check whether there is enough free space for the given message.* The same values of first_idx and next_idx mean that the buffer* is either empty or full.* If the buffer is empty, we must respect the position of the indexes.

函数原型:static int logbuf_has_space(unsigned int msg_size, bool empty)

返回类型:int

参数:

类型参数名称
unsigned intmsg_size
boolempty
532  如果log_next_idx大于log_first_idxemptyfree等于两数取大(log_buf_len - log_next_idx, log_first_idx)
534  否则free等于log_first_idxlog_next_idx
541  返回:free大于等于msg_sizesizeof(structprintk_log)
调用者
名称描述
log_make_free_space