| Function report | 
| Source Code: ipc\sem.c | Create Date:2022-07-28 16:43:35 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:wary - Create a new semaphore set*@ns: namespace*@params: ptr to the structure that contains key, semflg and nsems* Called with sem_ids.rwsem held (as a writer)
Proto:static int newary(struct ipc_namespace *ns, struct ipc_params *params)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct ipc_namespace * | ns | |
| struct ipc_params * | params | 
| 514 | nsems = for semaphores | 
| 530 | security = NULL | 
| 531 | retval = security_sem_alloc( & permissions .. see ipc.h ) | 
| 532 | If retval Then | 
| 534 | Return retval | 
| 543 | pending complex operations = 0 | 
| 544 | >0: global lock required = Switching from the mode suitable for simple ops* to the mode for complex ops is costly. Therefore:* use some hysteresis | 
| 552 | retval = pc_addid - add an ipc identifier*@ids: ipc identifier set*@new: new ipc permission set*@limit: limit for the number of used ids* Add an entry 'new' to the ipc ids idr | 
| 553 | If retval < 0 Then | 
| 555 | Return retval | 
| 559 | sem_unlock(sma, - 1) | 
| 562 | Return id | 
| 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 |