NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | RESTRICTIONS | ERRORS | ATTRIBUTES | SEE ALSO
#include <mem/chMem.h> #include <mem/chMapper.h>int lcPushData(KnObjDesc *source, VmFlags sourceFlags, KnObjDesc *target, VmFlags targetFlags, MpPullInId pullInId, unsigned long ordinalNb);
MEM_VM
This system call is strictly reserved for internal use only. It MUST NOT be used by any application.
The source argument points to a KnObjDesc structure whose members are the following:
KnCap dataObject ; VmOffset startOffset ; VmSize size ; |
where the dataObject field is the local cache capability, the startOffset field is the start offset of the part in the local cache, and the size field is the part size. The sourceFlags parameter indicates the new access level for the local cache which is the source cache for the push data operation.
If the K_READABLE flag is set, lcPushData sends the requested data to the target local cache and sets the source access to read-only.
If the K_NOACCESS flag is set, lcPushData sends the requested data to the target local cache and discards the source data.
If the K_PAGEFAULT flag is set, lcPushData is the result of a page fault. This operation could break the atomicity of ansgRead/sgWrite operation running concurrently on the same local cache parts.
If the K_ORDERED flag is set, the lcPushData request is an ordered message.
The target argument points to a KnObjDesc structure which contains the capability of a local cache which is requesting data for an overlapping area of the same segment. The targetFlags parameter can be used to pass access information to the target site. The pullinId argument is provided in a MpIn request from the target site.
The ordinalNb argument specifies the order number of the request. For each local cache the kernel maintains a variable containing the order number expected for the next ordered message. The variable is initialized with zero. When the kernel receives an ordered message for a local cache, it compares the message order number with the order number expected. If the message order number is greater than or equal to the one expected, the kernel sets the expected order number to the message order number plus one and then processes the message. If the message order number is less than the one expected, the lcPushData request is processed, but the expected order number is not modified.
This operation is applied even if the source cache is managed by a remote site. The effect of lcPushData on the source cache is similar to lcFlush using the same flags. The difference is that lcFlush causes modified data to be pushed to the mapper.
If successful, lcPushData returns K_OK, otherwise a negative error code is returned. The number of bytes pushed to the target cache is returned in target->size.
The current implementation of lcPushData restricts the pushed data to one page.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | RESTRICTIONS | ERRORS | ATTRIBUTES | SEE ALSO