![]() |
DeferUserFn |
||||
Header: | MacMemory.h | Carbon status: | Unsupported | |
Determines whether code that might cause page faults can safely be called immediately.
OSErr DeferUserFn ( UserFnUPP userFunction, void *argument );
The address of the function to run.
A pointer to the argument to pass to the specified function.
A result code. A result code.
If the code can be called safely, DeferUserFn calls the function you designate in the parameter userFunction, with register A0 containing the value you designate in the parameter argument. If a page fault is in progress, however, the function address and its parameter are saved, and the function is deferred until page faults are again permitted.
Note that the function might be called immediately (before returning to the caller of DeferUserFn). Deferred functions must follow the register conventions used by interrupt handlers: they can use registers A0A3 and D0D3, and they must restore all other registers used.
Not supported in Carbon. Not available in CarbonLib, but available when InterfaceLib 7.1 or later is installed. Exported by InterfaceLib 7.1 and later.