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:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_open

Proto:static int do_open(struct inode *inode, struct file *filp)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct file *filp
1608  as = Allocation memory
1609  If (as == NULL) Then Return -ENOMEM
1612  magic = The magic number in apm_user
1613  event_tail = event_head = 0
1614  suspends_pending = standbys_pending = 0
1615  suspends_read = standbys_read = 0
1623  suser = Check operation authority
1624  writer = (f_mode & le is open for writing ) == le is open for writing
1625  reader = (f_mode & le is open for reading ) == le is open for reading
1626  spin_lock( & user_list_lock)
1627  next = user_list
1628  user_list = as
1629  spin_unlock( & user_list_lock)
1630  needed for tty driver, and maybe others = as
1631  Return 0