Back to Darwin Xnu

MO Lock Completed

osfmk/man/MO_lock_completed.html

latest2.7 KB
Original Source

memory_object_lock_completed


Server Interface - Report to memory manager that a previous consistency control request has been handled.

SYNOPSIS

**kern\_return\_t memory\_object\_lock\_completed**** (memory\_object\_t **reply\_port,** memory\_object\_control\_t **memory\_control,** vm\_offset\_t **offset,** vm\_size\_t **length** ); ****kern\_return\_t seqnos\_memory\_object\_lock\_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** );**

PARAMETERS

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

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

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.

length[in scalar] The number of bytes to which the call refers, starting at offset. The number converts to an integral number of memory object pages.

DESCRIPTION

A memory_object_lock_completed function is called as the result of a kernel message confirming the kernel's action in response to a memory_object_lock_request call from the memory manager. The memory manager can use the memory_object_lock_request call to:

  • Alter access restrictions specified in the memory_object_data_supply call or a previous memory_object_lock_request call.

  • Invalidate its cached data.

When the kernel completes the requested actions, it calls memory_object_lock_completed (asynchronously) using the port explicitly provided in the memory_object_lock_request call. Because the memory manager cannot know which pages have been modified, or even which pages remain in the cache, it cannot know how many pages will be written back in response to a memory_object_lock_request call. Receiving the memory_object_lock_completed call is the only sure means of detecting completion. The completion call includes the offset and length values from the consistency request to distinguish it from other consistency requests.

RETURN VALUES

Only generic errors apply.

Functions: memory_object_lock_request, memory_object_server, seqnos_memory_object_server.