Jump to content

DevHelp_UnPhysToVirt

From EDM2
Revision as of 22:48, 22 May 2025 by Martini (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Mark the Completion of Virtual Address Use

This service is required to mark completion of address conversion from PhysToVirt.

Remarks

This function still exists for compatibility reasons but is no longer operational. Under OS/2 Warp, UnPhysToVirt exists for compatibility with older drivers. It can be eliminated from driver which run exclusively under OS/2 Warp.

For OS/2 1.X, UnPhysToVirt must be called by the same procedure that issued the PhysToVirt when the use of converted addresses is completed and before the procedure returns to its caller. The procedure that called PhysToVirt may call other procedures before calling UnPhysToVirt. Multiple PhysToVirt calls may be issued prior to issuing the UnPhysToVirt. Only one call to UnPhysToVirt is needed.

Example Code

C Calling Convention
if (UnPhysToVirt()) error
C Sample
if (UnPhysToVirt())
    return(RPDONE | RPERR | ERROR_GEN_FAILURE);