Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Refrigerator is place where frozen processes are stored :-).

Proto:bool __refrigerator(bool check_kthr_stop)

Type:bool

Parameter:

TypeParameterName
boolcheck_kthr_stop
60  bool was_frozen = false
61  save = state
63  pr_debug("%s entered refrigerator\n", comm)
65  cycle
66  set_current_state(TASK_UNINTERRUPTIBLE)
68  spin_lock_irq( & protects freezing and frozen transitions )
69  flags |= Frozen for system suspend
70  If Not freezing(current process) || check_kthr_stop && 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(). Then flags &= ~Frozen for system suspend
73  spin_unlock_irq( & protects freezing and frozen transitions )
75  If Not (flags & Frozen for system suspend ) Then Break
77  was_frozen = true
78  schedule()
81  pr_debug("%s left refrigerator\n", comm)
88  set_current_state(save)
90  Return was_frozen
Caller
NameDescribe
kthread_freezable_should_stopkthread_freezable_should_stop - should this freezable kthread return now?*@was_frozen: optional out parameter, indicates whether %current was frozen* kthread_should_stop() for freezable kthreads, which will enter* refrigerator if necessary