INtime SDK Help
CreateGlobalRtMemoryHandle
INtime SDK v6 > About INtime > INtime Kernel > Global objects > CreateGlobalRtMemoryHandle

Creates a handle for a physical memory area on a remote node indicated by the LOCATION parameter, and on the same host as the caller, and returns a handle to a reference object for that handle.

#include <rt.h> 

RTHANDLE CreateGlobalRtMemoryHandle(  
    LOCATION hLoc, 
    UINT_32 paBaseAddr, 
    UINT_32 cbSize, 
    UINT_16 Flags
);
 
RTHANDLE CreateGlobalRtMemoryHandle64(  
    LOCATION hLoc, 
    UINT_64 paBaseAddr, 
    UINT_32 cbSize, 
    UINT_16 Flags
);

Parameters

hLoc
The location where the object is to be created.
paBaseAddr
The absolute, 32-bit (CreateGlobalRtMemoryHandle), or 64-bit (CreateGlobalRtMemoryHandle64), physical address of the area to be mapped.
cbSize
The size in bytes of the area to be mapped.
Flags
If the flag value REFCOUNT is specified, create the object as a reference-counted object.

Remarks

Creates a memory handle of size cbSize for the memory at physical address paBaseAddr on the node indicated by the LOCATION parameter and returns a reference to that memory handle. Note that this call is not valid for nodes which do not share the same host as the caller. The value REFCOUNT) for the Flags parameter indicates that the memory object should be created with a reference counter. If the memory object is not created with a reference counter then it is considered to be owned by the calling process, even if it is resident on a remote node. Thus if the local process is deleted the remote node's Global Objects Manager process is responsible for deleting the remote mailbox object. In the case of a reference-counted memory object the object is only deleted after the reference count decrements to zero.

Return Values

A valid reference object handle
Success.
BAD_RTHANDLE
Failure. The function sets GetLastRtError to one of these values:
E_RESOURCE_LIMIT Insufficient resources are available to signal the remote node.
E_SLOT The maximum number of objects on the local node or the remote node has been exceeded.
E_MEM Insufficient physical memory is available to create the reference object or the remote handle.
E_INVALID_ADDRESS (0x00E2) The address provided for hLoc is not a valid address.

Requirements

Versions Defined in Include Link to

INtime 4.0

INtime 6.2 (CreateGlobalRtMemoryHandle64)

intime/rt/include/rt.h rt.h rt.lib
See Also