diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2008-11-14 15:10:32 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2008-11-14 15:10:32 +0000 |
commit | 40883e0bb53b165b71bc995a8387087e2f889caa (patch) | |
tree | c62a8aa14ff91d0fb7ede8c8ea18b583e8bf4968 /sys/arch | |
parent | 3962211a90d0f24c9eff89e9a0c6aa77334872ff (diff) |
Atomically update the PTE.
okay weingart@ art@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/pmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c index 4ff50ca2628..9c286c62893 100644 --- a/sys/arch/i386/i386/pmap.c +++ b/sys/arch/i386/i386/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.126 2008/11/06 19:14:26 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.127 2008/11/14 15:10:31 kurt Exp $ */ /* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */ /* @@ -1956,8 +1956,8 @@ pmap_remove_pte(struct pmap *pmap, struct vm_page *ptp, pt_entry_t *pte, if ((flags & PMAP_REMOVE_SKIPWIRED) && (*pte & PG_W)) return (FALSE); - opte = *pte; /* save the old PTE */ - *pte = 0; /* zap! */ + /* atomically save the old PTE and zap! it */ + opte = i386_atomic_testset_ul(pte, 0); pmap_exec_account(pmap, va, opte, 0); |