Function report |
Source Code:ipc\sem.c |
Create Date:2022-07-28 16:44:34 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:semctl_setval
Proto:static int semctl_setval(struct ipc_namespace *ns, int semid, int semnum, int val)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct ipc_namespace * | ns | |
| int | semid | |
| int | semnum | |
| int | val |
| 1333 | If val > <= 32767 semaphore maximum value || val < 0 Then Return -ERANGE |
| 1337 | sma = sem_obtain_object_check(ns, semid) |
| 1343 | If semnum < 0 || semnum >= . of semaphores in array Then |
| 1345 | Return -EINVAL |
| 1351 | Return -EACCES |
| 1354 | err = security_sem_semctl( & permissions .. see ipc.h , set semval ) |
| 1355 | If err Then |
| 1357 | Return -EACCES |
| 1363 | sem_unlock(sma, - 1) |
| 1365 | Return -EIDRM |
| 1373 | array of adjustments [semnum] = 0 |
| 1375 | current value = val |
| 1380 | sem_unlock(sma, - 1) |
| 1383 | Return 0 |
| 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 |