Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:log_make_free_space

Proto:static int log_make_free_space(unsigned int msg_size)

Type:int

Parameter:

TypeParameterName
unsigned intmsg_size
546  When dex and sequence number of the first record stored in the buffer < dex and sequence number of the next record to store in the buffer && Not 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. cycle
549  log_first_idx = get next record; idx must point to valid msg
550  dex and sequence number of the first record stored in the buffer ++
553  If he next printk record to read after the last 'clear' command < dex and sequence number of the first record stored in the buffer Then
554  he next printk record to read after the last 'clear' command = dex and sequence number of the first record stored in the buffer
555  clear_idx = log_first_idx
559  If 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. Then Return 0
562  Return -ENOMEM
Caller
NameDescribe
log_storesert record into the buffer, discard old ones, update heads