Back to Darwin Xnu

MO Supply Completed

osfmk/man/MO_supply_completed.html

latest3.0 KB
Original Source

memory_object_supply_completed


Server Interface - Return results associated with the kernel's handling of a particular memory manager request.

SYNOPSIS

**kern\_return\_t memory\_object\_supply\_completed**** (memory\_object\_t **reply\_port,** memory\_object\_control\_t **memory\_control,** vm\_offset\_t **offset,** vm\_size\_t **length,** kern\_return\_t **result,** vm\_offset\_t **error\_offset** ); ****kern\_return\_t seqnos\_memory\_object\_supply\_completed**** (memory\_object\_t **reply\_port,** mach\_port\_seqno\_t **seqno,** memory\_object\_control\_t **memory\_control,** vm\_offset\_t **offset,** vm\_size\_t **length,** kern\_return\_t **result,** vm\_offset\_t **error\_offset** );**

PARAMETERS

reply_port[in reply (receive) right] The port supplied in the corresponding memory_object_data_supply call.

seqno[in scalar] The sequence number of this message relative to the port named in the memory_object_data_supply call.

memory_control[in memory-cache-control send right] The memory cache control port to be used for a response by the memory manager. If the memory object has been supplied to more than one kernel, this parameter identifies the kernel that is making the call.

offset[in scalar] The offset within the memory object from the corresponding data supply call.

length[in scalar] The number of bytes accepted. The number converts to an integral number of memory object pages.

result[in scalar] A kernel return code indicating the result of the supply operation, possibly KERN_SUCCESS. KERN_MEMORY_PRESENT is currently the only error returned; other errors (invalid arguments, for example) abort the data supply operation.

error_offset[in scalar] The offset within the memory object where the first error occurred.

DESCRIPTION

A memory_object_supply_completed function is called as the result of a kernel message confirming the kernel's action in response to a memory_object_data_supply call from the memory manager.

When the kernel accepts the pages, it calls memory_object_supply_completed (asynchronously) using the port explicitly provided in the memory_object_data_supply call. Because the data supply call can provide multiple pages, not all of which the kernel may necessarily accept and some of which the kernel may have to return to the manager (if precious), the kernel provides this response. If the kernel does not accept all of the pages in the data supply message, it will indicate so in the completion response. If the pages not accepted are precious, they will be returned (in memory_object_data_return messages) before it sends this completion message. The completion call includes the offset and length values from the supply request to distinguish it from other supply requests.

RETURN VALUES

Only generic errors apply.

Functions: memory_object_data_supply, memory_object_server, seqnos_memory_object_server.