Print this page
patch as-lock-macro-simplification

@@ -1271,16 +1271,16 @@
                          * If we have a very large segment, this may fail, so
                          * we have to check for that, even though we ignore
                          * other return values from as_setprot.
                          */
 
-                        AS_LOCK_ENTER(as, &as->a_lock, RW_READER);
+                        AS_LOCK_ENTER(as, RW_READER);
                         seg = as_segat(curproc->p_as, (caddr_t)end);
                         if (seg != NULL)
                                 SEGOP_GETPROT(seg, (caddr_t)end, zfoddiff - 1,
                                     &zprot);
-                        AS_LOCK_EXIT(as, &as->a_lock);
+                        AS_LOCK_EXIT(as);
 
                         if (seg != NULL && (zprot & PROT_WRITE) == 0) {
                                 if (as_setprot(as, (caddr_t)end, zfoddiff - 1,
                                     zprot | PROT_WRITE) == ENOMEM) {
                                         error = ENOMEM;