|
Userspace API for sharing memory between unrelated processes November 13, 2009 03:30AM |
/** * Create an offer to the specified process for the given range of address space. * The address space must be a whole multiple of pages. * The address space must be validly mapped for the current process. * Changes specified by this function do not occur until the remote process * accepts the offer. * An offer can be cancelled by offering the same address with a size of 0. * If the target process has already accepted the offer, it is too late, and the * call will simply fail as this address is no longer valid for the current process. * If all permissions are dropped, then the memory is unmapped from the current * process when the offer is claimed. * Flags: * VMO_GRANT_R - grant read access to the remote process * VMO_GRANT_W - grant write access to the remote process * VMO_GRANT_X - grant exec access to the remote process * VMO_DROP_R - release this process' read permission for the pages * VMO_DROP_W - release this process' write permission for the pages * VMO_DROP_X - release this process' exec permission for the pages * * VMO_DISOWN - combination of all "drop" flags * VMO_GRANTALL - combination of all "grant" flags */ int vm_offer(int dest_pid, void *addr, int len, int flags); /** * Receive an offer of VM pages from another process. * The offer must have already been made by the source process. * The offer is identified (from other offers made by that process) by specifying the remote virtual address. * Flags: * (none, yet) */ int vm_claim(int src_pid, void *remote_addr, void **local_addr, int *size, int flags); /** * List sent and received offers. * list is a buffer to which an array of offer records will be written * count should be initialized to the size (in records) of the list * upon successful return, list is populated, and count is the number of entries * upon failure, list is unaltered and count is the number of entries needed in order to return successfully * Note that offers are dynamic in nature and may change before the entries can be acted on. */ int vm_listoffer(vm_offer_t *list, int *count);
|
Re: Userspace API for sharing memory between unrelated processes November 13, 2009 07:41AM |
Registered: 10 months ago Posts: 133 |
|
MConrad
Re: Userspace API for sharing memory between unrelated processes November 13, 2009 01:12PM |
|
Re: Userspace API for sharing memory between unrelated processes November 16, 2009 01:46PM |
Registered: 10 months ago Posts: 133 |
|
MConrad
Re: Userspace API for sharing memory between unrelated processes November 18, 2009 04:50PM |
