Deleted Added
full compact
vm_page.h (40700) vm_page.h (42408)
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 47 unchanged lines hidden (view full) ---

56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
57 * School of Computer Science
58 * Carnegie Mellon University
59 * Pittsburgh PA 15213-3890
60 *
61 * any improvements or extensions that they make and grant Carnegie the
62 * rights to redistribute these changes.
63 *
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 47 unchanged lines hidden (view full) ---

56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
57 * School of Computer Science
58 * Carnegie Mellon University
59 * Pittsburgh PA 15213-3890
60 *
61 * any improvements or extensions that they make and grant Carnegie the
62 * rights to redistribute these changes.
63 *
64 * $Id: vm_page.h,v 1.47 1998/10/21 14:46:42 dg Exp $
64 * $Id: vm_page.h,v 1.48 1998/10/28 13:37:02 dg Exp $
65 */
66
67/*
68 * Resident memory system definitions.
69 */
70
71#ifndef _VM_PAGE_
72#define _VM_PAGE_

--- 313 unchanged lines hidden (view full) ---

386vm_page_hold(vm_page_t mem)
387{
388 mem->hold_count++;
389}
390
391static __inline void
392vm_page_unhold(vm_page_t mem)
393{
65 */
66
67/*
68 * Resident memory system definitions.
69 */
70
71#ifndef _VM_PAGE_
72#define _VM_PAGE_

--- 313 unchanged lines hidden (view full) ---

386vm_page_hold(vm_page_t mem)
387{
388 mem->hold_count++;
389}
390
391static __inline void
392vm_page_unhold(vm_page_t mem)
393{
394#ifdef DIAGNOSTIC
395 if (--mem->hold_count < 0)
396 panic("vm_page_unhold: hold count < 0!!!");
397#else
398 --mem->hold_count;
394 --mem->hold_count;
399#endif
395 KASSERT(mem->hold_count >= 0, ("vm_page_unhold: hold count < 0!!!"));
400}
401
402static __inline void
403vm_page_protect(vm_page_t mem, int prot)
404{
405 if (prot == VM_PROT_NONE) {
406 if (mem->flags & (PG_WRITEABLE|PG_MAPPED)) {
407 pmap_page_protect(VM_PAGE_TO_PHYS(mem), VM_PROT_NONE);

--- 39 unchanged lines hidden ---
396}
397
398static __inline void
399vm_page_protect(vm_page_t mem, int prot)
400{
401 if (prot == VM_PROT_NONE) {
402 if (mem->flags & (PG_WRITEABLE|PG_MAPPED)) {
403 pmap_page_protect(VM_PAGE_TO_PHYS(mem), VM_PROT_NONE);

--- 39 unchanged lines hidden ---