Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apm_32.c Create Date:2022-07-28 08:22:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:queue_event

Proto:static void queue_event(apm_event_t event, struct apm_user *sender)

Type:void

Parameter:

TypeParameterName
apm_event_tevent
struct apm_user *sender
1180  spin_lock( & user_list_lock)
1181  If (user_list == NULL) Then Go to out
1183  When as != NULL cycle
1184  If as == sender || Not reader Then Continue
1186  If ++event_head >= Maximum number of events stored Then event_head = 0
1189  If event_head == event_tail Then
1192  If notified++ == 0 Then pr_err("an event queue overflowed\n")
1197  events[event_head] = event
1198  If Not suser || Not writer Then Continue
1201  Case event == APM_SYS_SUSPEND
1202  Case event == APM_USER_SUSPEND
1203  suspends_pending++
1204  suspends_pending++
1205  Break
1207  Case event == Events (results of Get PM Event)
1208  Case event == APM_USER_STANDBY
1209  standbys_pending++
1210  standbys_pending++
1211  Break
1214  wake_up_interruptible( & apm_waitqueue)
1215  out :
1216  spin_unlock( & user_list_lock)
Caller
NameDescribe
suspend
check_events
do_ioctl