函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apm_32.c Create Date:2022-07-27 09:22:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:do_ioctl

函数原型:static long do_ioctl(struct file *filp, u_int cmd, u_long arg)

返回类型:long

参数:

类型参数名称
struct file *filp
u_intcmd
u_longarg
1523  as等于 needed for tty driver, and maybe others
1524  如果check_apm_user(as, "ioctl")则返回:负EIO
1526  如果非suser或非writer则返回:负EPERM
1529  :cmd恒等于APM_IOC_STANDBY
1530  mutex_lock( & apm_mutex)
1531  如果standbys_read大于0则
1532  standbys_read自减
1533  standbys_pending自减
1534  standbys_pending自减
1535  否则queue_event(APM_USER_STANDBY, as)
1537  如果standbys_pending小于等于0则standby()
1539  mutex_unlock( & apm_mutex)
1540  退出
1541  :cmd恒等于APM_IOC_SUSPEND
1542  mutex_lock( & apm_mutex)
1543  如果suspends_read大于0则
1544  suspends_read自减
1545  suspends_pending自减
1546  suspends_pending自减
1547  否则queue_event(APM_USER_SUSPEND, as)
1549  如果suspends_pending小于等于0则
1550  ret等于suspend(1)
1551  mutex_unlock( & apm_mutex)
1552  否则
1553  suspend_wait等于1
1554  mutex_unlock( & apm_mutex)
1557  ret等于suspend_result
1559  返回:ret
1560  默认
1561  返回:负ENOTTY
1563  返回:0