Function report |
Source Code:ipc\sem.c |
Create Date:2022-07-28 16:44:55 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This function handles some semctl commands which require the rwsem* to be held in write mode.* NOTE: no locks must be held, the rwsem is taken inside this function.
Proto:static int semctl_down(struct ipc_namespace *ns, int semid, int cmd, struct semid64_ds *semid64)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct ipc_namespace * | ns | |
| int | semid | |
| int | cmd | |
| struct semid64_ds * | semid64 |
| 1590 | lock for writing |
| 1597 | Go to out_unlock1 |
| 1602 | err = security_sem_semctl( & permissions .. see ipc.h , cmd) |
| 1603 | If err Then Go to out_unlock1 |
| 1607 | Case cmd == move resource |
| 1611 | Go to out_up |
| 1612 | Case cmd == set ipc_perm options |
| 1614 | err = pc_update_perm - update the permissions of an ipc object*@in: the permission given as input.*@out: the permission of the ipc to set. |
| 1615 | If err Then Go to out_unlock0 |
| 1618 | Break |
| 1619 | Default |
| 1621 | Go to out_unlock1 |
| 1624 | out_unlock0 : |
| 1625 | sem_unlock(sma, - 1) |
| 1626 | out_unlock1 : |
| 1628 | out_up : |
| 1629 | lease a write lock |
| 1630 | Return err |
| Name | Describe |
|---|---|
| ksys_semctl | |
| compat_ksys_semctl |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |