libnx
v4.7.0
|
Shared memory object handling. More...
#include "../types.h"
Go to the source code of this file.
Data Structures | |
struct | SharedMemory |
Shared memory information structure. More... | |
Functions | |
Result | shmemCreate (SharedMemory *s, size_t size, Permission local_perm, Permission remote_perm) |
Creates a shared memory object. More... | |
void | shmemLoadRemote (SharedMemory *s, Handle handle, size_t size, Permission perm) |
Loads a shared memory object coming from a remote process. More... | |
Result | shmemMap (SharedMemory *s) |
Maps a shared memory object. More... | |
Result | shmemUnmap (SharedMemory *s) |
Unmaps a shared memory object. More... | |
static void * | shmemGetAddr (SharedMemory *s) |
Retrieves the mapped address of a shared memory object. More... | |
Result | shmemClose (SharedMemory *s) |
Frees up resources used by a shared memory object, unmapping and closing handles, etc. More... | |
Shared memory object handling.
Result shmemClose | ( | SharedMemory * | s | ) |
Frees up resources used by a shared memory object, unmapping and closing handles, etc.
s | Shared memory information structure. |
Result shmemCreate | ( | SharedMemory * | s, |
size_t | size, | ||
Permission | local_perm, | ||
Permission | remote_perm | ||
) |
Creates a shared memory object.
s | Shared memory information structure which will be filled in. |
size | Size of the shared memory object to create. |
local_perm | Permissions with which the shared memory object will be mapped in the local process. |
remote_perm | Permissions with which the shared memory object will be mapped in the remote process (can be Perm_DontCare). |
|
inlinestatic |
Retrieves the mapped address of a shared memory object.
s | Shared memory information structure. |
void shmemLoadRemote | ( | SharedMemory * | s, |
Handle | handle, | ||
size_t | size, | ||
Permission | perm | ||
) |
Loads a shared memory object coming from a remote process.
s | Shared memory information structure which will be filled in. |
handle | Handle of the shared memory object. |
size | Size of the shared memory object that is being loaded. |
perm | Permissions with which the shared memory object will be mapped in the local process. |
Result shmemMap | ( | SharedMemory * | s | ) |
Maps a shared memory object.
s | Shared memory information structure. |
Result shmemUnmap | ( | SharedMemory * | s | ) |
Unmaps a shared memory object.
s | Shared memory information structure. |