函数逻辑报告 |
Source Code:ipc\shm.c |
Create Date:2022-07-27 18:22:28 |
Last Modify:2020-03-17 22:58:32 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:wseg - Create a new shared memory segment*@ns: namespace*@params: ptr to the structure that contains key, size and shmflg* Called with shm_ids.rwsem held as a writer.
函数原型:static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct ipc_namespace * | ns | |
struct ipc_params * | params |
604 | size等于 for shared memories |
610 | acctflag等于0 |
612 | 如果size小于min shared seg size (bytes) 或size大于shm_ctlmax则返回:负EINVAL |
615 | 如果numpages左移PAGE_SHIFT determines the page size 位小于size则返回:负ENOSPC |
622 | shp等于kvmalloc(shp的长度, GFP_KERNEL) |
623 | 如果此条件成立可能性小(为编译器优化)(!shp)则返回:负ENOMEM |
628 | mlock_user = NULL |
630 | security = NULL |
631 | error等于security_shm_alloc( & shm_perm) |
632 | 如果error则 |
634 | 返回:error |
637 | 输出格式化串 |
638 | 如果shmflg按位与segment will use huge TLB pages 则 |
642 | hs等于hstate_sizelog((shmflg >> Huge page size encoding when SHM_HUGETLB is specified, and a huge page* size other than the default is desired. See hugetlb_encode.h) & SHM_HUGE_MASK) |
643 | 如果非hs则 |
647 | hugesize等于@a is a power of 2 value (size, huge_page_size(hs)) |
655 | 否则 |
670 | shm_lprid = NULL |
674 | shm_nattch等于0 |
679 | error等于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 |
683 | 添加链表项 |
694 | ipc_unlock_object( & shm_perm) |
696 | 返回:error |
698 | no_id : |
699 | ipc_update_pid( & shm_cprid, NULL) |
700 | ipc_update_pid( & shm_lprid, NULL) |
704 | ipc_rcu_putref( & shm_perm, shm_rcu_free) |
705 | 返回:error |
706 | no_file : |
708 | 返回:error |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |