Function report |
Source Code:ipc\shm.c |
Create Date:2022-07-28 16:47:33 |
| Last Modify:2020-03-17 22:58:32 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This function handles some shmctl 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 shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, struct shmid64_ds *shmid64)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct ipc_namespace * | ns | |
| int | shmid | |
| int | cmd | |
| struct shmid64_ds * | shmid64 |
| 898 | lock for writing |
| 905 | Go to out_unlock1 |
| 910 | err = security_shm_shmctl( & shm_perm, cmd) |
| 911 | If err Then Go to out_unlock1 |
| 915 | Case cmd == move resource |
| 916 | ipc_lock_object( & shm_perm) |
| 919 | Go to out_up |
| 920 | Case cmd == set ipc_perm options |
| 921 | ipc_lock_object( & shm_perm) |
| 922 | 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. |
| 923 | If err Then Go to out_unlock0 |
| 926 | Break |
| 927 | Default |
| 929 | Go to out_unlock1 |
| 932 | out_unlock0 : |
| 933 | ipc_unlock_object( & shm_perm) |
| 934 | out_unlock1 : |
| 936 | out_up : |
| 938 | Return err |
| Name | Describe |
|---|---|
| ksys_shmctl | |
| compat_ksys_shmctl |
| 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 |