home *** CD-ROM | disk | FTP | other *** search
- /***
- * vmlockc.c -
- *
- * Copyright (c) 1989-1992, Microsoft Corporation. All rights reserved.
- *
- *Purpose:
- *
- * PUBLIC Functions:
- *
- * CVmLockVp:
- * This function returns the lock count for the page containing
- * the specified virtual address. If the page is not locked, the
- * function will return 0.
- *
- *******************************************************************************/
-
- #pragma title("Virtual Memory Manager")
- #pragma subtitle("Locking functions")
-
- #include <version.h>
- #include <vmassert.h>
- #include <system.h>
- #include <error.h>
- #include <vm.h>
- #include <vmp.h>
-
- #include <stddef.h>
-
-
- #pragma page()
-
- unsigned PUBLIC __CVmLockVp(VPVOID vp)
- {
- HPGD hpgd;
-
- VmTracePrintf(("CVmLockVp: vp = %08lX.\n", vp));
-
- Assert((vp >= vpptMax) && (vp < vpMax));
-
- hpgd = __HpgdSearchCache(vp);
-
- return((hpgd == hpgdNil) ? 0 : PpgdOfHpgd(hpgd)->cLock);
- }
-