libnx
v4.7.0
|
Transfer memory handling. More...
Go to the source code of this file.
Data Structures | |
struct | TransferMemory |
Transfer memory information structure. More... | |
Functions | |
Result | tmemCreate (TransferMemory *t, size_t size, Permission perm) |
Creates a transfer memory object. More... | |
Result | tmemCreateFromMemory (TransferMemory *t, void *buf, size_t size, Permission perm) |
Creates a transfer memory object from existing memory. More... | |
void | tmemLoadRemote (TransferMemory *t, Handle handle, size_t size, Permission perm) |
Loads a transfer memory object coming from a remote process. More... | |
Result | tmemMap (TransferMemory *t) |
Maps a transfer memory object. More... | |
Result | tmemUnmap (TransferMemory *t) |
Unmaps a transfer memory object. More... | |
static void * | tmemGetAddr (TransferMemory *t) |
Retrieves the mapped address of a transfer memory object. More... | |
Result | tmemCloseHandle (TransferMemory *t) |
Closes handle of a transfer memory object. More... | |
Result | tmemWaitForPermission (TransferMemory *t, Permission perm) |
Waits until source backing memory permissions match perm. More... | |
Result | tmemClose (TransferMemory *t) |
Frees up resources used by a transfer memory object, unmapping and closing handles, etc. More... | |
Transfer memory handling.
Result tmemClose | ( | TransferMemory * | t | ) |
Frees up resources used by a transfer memory object, unmapping and closing handles, etc.
t | Transfer memory information structure. |
Result tmemCloseHandle | ( | TransferMemory * | t | ) |
Closes handle of a transfer memory object.
t | Transfer memory information structure. |
Result tmemCreate | ( | TransferMemory * | t, |
size_t | size, | ||
Permission | perm | ||
) |
Creates a transfer memory object.
t | Transfer memory information structure that will be filled in. |
size | Size of the transfer memory object to create. |
perm | Permissions with which to protect the transfer memory in the local process. |
Result tmemCreateFromMemory | ( | TransferMemory * | t, |
void * | buf, | ||
size_t | size, | ||
Permission | perm | ||
) |
Creates a transfer memory object from existing memory.
t | Transfer memory information structure that will be filled in. |
buf | Pointer to a page-aligned buffer. |
size | Size of the transfer memory object to create. |
perm | Permissions with which to protect the transfer memory in the local process. |
|
inlinestatic |
Retrieves the mapped address of a transfer memory object.
t | Transfer memory information structure. |
void tmemLoadRemote | ( | TransferMemory * | t, |
Handle | handle, | ||
size_t | size, | ||
Permission | perm | ||
) |
Loads a transfer memory object coming from a remote process.
t | Transfer memory information structure which will be filled in. |
handle | Handle of the transfer memory object. |
size | Size of the transfer memory object that is being loaded. |
perm | Permissions which the transfer memory is expected to have in the process that owns the memory. |
Result tmemMap | ( | TransferMemory * | t | ) |
Maps a transfer memory object.
t | Transfer memory information structure. |
Result tmemUnmap | ( | TransferMemory * | t | ) |
Unmaps a transfer memory object.
t | Transfer memory information structure. |
Result tmemWaitForPermission | ( | TransferMemory * | t, |
Permission | perm | ||
) |
Waits until source backing memory permissions match perm.
t | Transfer memory information structure. |
perm | Permissions which the source backing memory is expected to have before return. |