]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/sysv_shm.c
xnu-792.22.5.tar.gz
[apple/xnu.git] / bsd / kern / sysv_shm.c
index b8dfa99343a1e4f685e7aa4b1e75440911b22631..37822b44e88a9876e71216f66d368c1be03eb461 100644 (file)
@@ -835,12 +835,10 @@ sysv_shm_lock_init( void )
 {
 
        sysv_shm_subsys_lck_grp_attr = lck_grp_attr_alloc_init();
 {
 
        sysv_shm_subsys_lck_grp_attr = lck_grp_attr_alloc_init();
-       lck_grp_attr_setstat(sysv_shm_subsys_lck_grp_attr);
        
        sysv_shm_subsys_lck_grp = lck_grp_alloc_init("sysv_shm_subsys_lock", sysv_shm_subsys_lck_grp_attr);
        
        sysv_shm_subsys_lck_attr = lck_attr_alloc_init();
        
        sysv_shm_subsys_lck_grp = lck_grp_alloc_init("sysv_shm_subsys_lock", sysv_shm_subsys_lck_grp_attr);
        
        sysv_shm_subsys_lck_attr = lck_attr_alloc_init();
-       /* lck_attr_setdebug(sysv_shm_subsys_lck_attr); */
        lck_mtx_init(&sysv_shm_subsys_mutex, sysv_shm_subsys_lck_grp, sysv_shm_subsys_lck_attr);
 }
 
        lck_mtx_init(&sysv_shm_subsys_mutex, sysv_shm_subsys_lck_grp, sysv_shm_subsys_lck_attr);
 }
 
@@ -853,14 +851,14 @@ sysctl_shminfo(__unused struct sysctl_oid *oidp, void *arg1,
        int error = 0;
        int sysctl_shminfo_ret = 0;
 
        int error = 0;
        int sysctl_shminfo_ret = 0;
 
-       error = SYSCTL_OUT(req, arg1, sizeof(user_ssize_t));
+       error = SYSCTL_OUT(req, arg1, sizeof(int64_t));
        if (error || req->newptr == USER_ADDR_NULL)
                return(error);
 
        SYSV_SHM_SUBSYS_LOCK();
        /* Set the values only if shared memory is not initialised */
        if (!shm_inited) {
        if (error || req->newptr == USER_ADDR_NULL)
                return(error);
 
        SYSV_SHM_SUBSYS_LOCK();
        /* Set the values only if shared memory is not initialised */
        if (!shm_inited) {
-               if ((error = SYSCTL_IN(req, arg1, sizeof(user_ssize_t))) 
+               if ((error = SYSCTL_IN(req, arg1, sizeof(int64_t))) 
                    != 0) {
                        sysctl_shminfo_ret = error;
                        goto sysctl_shminfo_out;
                    != 0) {
                        sysctl_shminfo_ret = error;
                        goto sysctl_shminfo_out;
@@ -868,18 +866,18 @@ sysctl_shminfo(__unused struct sysctl_oid *oidp, void *arg1,
 
                if (arg1 == &shminfo.shmmax) {
                        if (shminfo.shmmax & PAGE_MASK_64) {
 
                if (arg1 == &shminfo.shmmax) {
                        if (shminfo.shmmax & PAGE_MASK_64) {
-                               shminfo.shmmax = (user_ssize_t)-1;
+                               shminfo.shmmax = (int64_t)-1;
                                sysctl_shminfo_ret = EINVAL;
                                goto sysctl_shminfo_out;
                        }
                }
 
                /* Initialize only when all values are set */
                                sysctl_shminfo_ret = EINVAL;
                                goto sysctl_shminfo_out;
                        }
                }
 
                /* Initialize only when all values are set */
-               if ((shminfo.shmmax != (user_ssize_t)-1) &&
-                       (shminfo.shmmin != (user_ssize_t)-1) && 
-                       (shminfo.shmmni != (user_ssize_t)-1) &&
-                       (shminfo.shmseg != (user_ssize_t)-1) &&
-                       (shminfo.shmall != (user_ssize_t)-1)) {
+               if ((shminfo.shmmax != (int64_t)-1) &&
+                       (shminfo.shmmin != (int64_t)-1) &&      
+                       (shminfo.shmmni != (int64_t)-1) &&
+                       (shminfo.shmseg != (int64_t)-1) &&
+                       (shminfo.shmall != (int64_t)-1)) {
                                shminit(NULL);
                }
        }
                                shminit(NULL);
                }
        }