/* * trap() calls here to determine if a fault is in a watched page. * We return nonzero if this is true and the load/store would fail. */ int pr_is_watchpage(caddr_t addr, enum seg_rw rw) { struct as *as = curproc->p_as; if ((as == &kas) || avl_numnodes(&as->a_wpage) == 0) return (0); return (pr_is_watchpage_as(addr, rw, as)); }
/* * trap() calls here to determine if a fault is in a watched page. * We return nonzero if this is true and the load/store would fail. */ int pr_is_watchpage(caddr_t addr, enum seg_rw rw) { struct as *as = curproc->p_as; int rv; if ((as == &kas) || avl_numnodes(&as->a_wpage) == 0) return (0); /* Grab the lock because of XHAT (see comment in pr_mappage()) */ AS_LOCK_ENTER(as, &as->a_lock, RW_READER); rv = pr_is_watchpage_as(addr, rw, as); AS_LOCK_EXIT(as, &as->a_lock); return (rv); }