Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\printk\printk.c Create Date:2022-07-28 10:05:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static int logbuf_has_space(unsigned int msg_size, bool empty)

Type:int

Parameter:

TypeParameterName
unsigned intmsg_size
boolempty
532  If log_next_idx > log_first_idx || empty Then free = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(log_buf_len - log_next_idx, log_first_idx)
534  Else free = log_first_idx - log_next_idx
541  Return free >= msg_size + sizeof(structprintk_log)
Caller
NameDescribe
log_make_free_space