Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Compression function that runs in its own thread.

Proto:static int lzo_compress_threadfn(void *data)

Type:int

Parameter:

TypeParameterName
void *data
637  d = data
639  When 1 cycle
640  wait_event - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_UNINTERRUPTIBLE) until the*@condition evaluates to true(start compression , atomic_read( & ady to start flag ) || kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop().)
643  hread = NULL
644  urn code = -1
647  Break
649  atomic_set( & ady to start flag , 0)
651  urn code = lzo1x_1_compress(unc, uncompressed length , cmp + We need to remember how much compressed data we need to read. , & compressed length , wrk)
654  atomic_set( & ady to stop flag , 1)
655  wake_up( & compression done )
657  Return 0