aclrtIpcMemSetImportPid
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
☓ |
|
√ |
|
√ |
Function
Sets the trustlist of processes that can share memory through IPC.
This API must work with other APIs to implement memory sharing. For details, see the description of aclrtIpcMemGetExportKey.
Prototype
1 | aclError aclrtIpcMemSetImportPid(const char *key, int32_t *pid, size_t num) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
key |
Input |
Memory key obtained by calling aclrtIpcMemGetExportKey. |
pid |
Input |
Array for storing trustlisted process IDs. You can call aclrtDeviceGetBareTgid to obtain the process ID. In the Docker scenario, the process ID on the physical machine is returned. In non-Docker scenarios, the process ID is returned. |
num |
Input |
Number of processes in the trustlist. The value must be the same as the size of the pid array. |
Returns
0 on success; otherwise, failure. For details, see aclError.