函数逻辑报告 |
Source Code:ipc\sem.c |
Create Date:2022-07-27 18:20:52 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:do_semtimedop
函数原型:static long do_semtimedop(int semid, struct sembuf __user *tsops, unsigned nsops, const struct timespec64 *timeout)
返回类型:long
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| int | semid | |
| struct sembuf __user * | tsops | |
| unsigned | nsops | |
| const struct timespec64 * | timeout |
| 1977 | dup等于0, jiffies_left等于0 |
| 1986 | 如果nsops大于~ 372 bytes on stack 则 |
| 1987 | sops等于kvmalloc_array(nsops, sops的长度, GFP_KERNEL) |
| 1992 | 如果copy_from_user(sops, tsops, nsops * tsops的长度)则 |
| 1997 | 如果timeout则 |
| 1998 | 如果 seconds 小于0或 nanoseconds 小于0或 nanoseconds 大于等于1000000000L则 |
| 2006 | max等于0 |
| 2008 | mask等于1ULL左移semaphore index in array 取模BITS_PER_LONG位 |
| 2010 | 如果semaphore index in array 大于等于max则max等于semaphore index in array |
| 2012 | 如果peration flags 按位与undo the operation on exit 则undos = true |
| 2021 | dupsop = true |
| 2023 | 如果semaphore operation 不等于0则 |
| 2029 | 如果undos则 |
| 2032 | 如果是错误则 |
| 2036 | 否则 |
| 2037 | un = NULL |
| 2041 | sma等于sem_obtain_object_check(ns, semid) |
| 2042 | 如果是错误则 |
| 2045 | 转到:out_free |
| 2049 | 如果max大于等于. of semaphores in array 则 |
| 2051 | 转到:out_free |
| 2057 | 转到:out_free |
| 2060 | error等于security_sem_semop( & permissions .. see ipc.h , sops, nsops, alter) |
| 2061 | 如果error则 |
| 2063 | 转到:out_free |
| 2067 | locknum等于If the request contains only one semaphore operation, and there are* no complex transactions pending, lock only the semaphore involved |
| 2085 | 如果un且semaphore set identifier 恒等于负1则转到:out_unlock_free |
| 2088 | array of pending operations 等于sops |
| 2089 | umber of operations 等于nsops |
| 2090 | undo structure 等于un |
| 2092 | does *sops alter the array? 等于alter |
| 2095 | error等于perform_atomic_semop(sma, & queue) |
| 2096 | 如果error恒等于0则 |
| 2108 | sem_unlock(sma, locknum) |
| 2112 | 转到:out_free |
| 2114 | 如果error小于0则转到:out_unlock_free |
| 2121 | 如果nsops恒等于1则 |
| 2126 | 如果alter则 |
| 2135 | 否则 |
| 2136 | 添加链表项 |
| 2138 | 否则 |
| 2144 | 否则添加链表项 |
| 2147 | pending complex operations 自加 |
| 2150 | 循环 |
| 2151 | WRITE_ONCE(completion status of operation , - EINTR) |
| 2152 | his process 等于当前进程 |
| 2155 | sem_unlock(sma, locknum) |
| 2158 | 如果timeout则jiffies_left等于schedule_timeout - sleep until timeout*@timeout: timeout value in jiffies* Make the current task sleep until @timeout jiffies have* elapsed |
| 2160 | 否则进程调度 |
| 2187 | locknum等于If the request contains only one semaphore operation, and there are* no complex transactions pending, lock only the semaphore involved |
| 2198 | 如果error不等于负EINTR则转到:out_unlock_free |
| 2204 | 如果timeout且jiffies_left恒等于0则error等于负EAGAIN |
| 2206 | 当error恒等于负EINTR且非signal_pending(当前进程)循环 |
| 2208 | unlink_queue(sma, & queue) |
| 2210 | out_unlock_free : |
| 2211 | sem_unlock(sma, locknum) |
| 2213 | out_free : |
| 2216 | 返回:error |
| 名称 | 描述 |
|---|---|
| ksys_semtimedop | |
| SYSCALL_DEFINE3 |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |