[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


cma_handle_assign

Assigns a handle to an object.

Syntax

cma_handle_assign(
                   handle1,
                   handle2);
 


Argument Data Type Access

handle1 opaque cma_t_handle read handle2 opaque cma_t_handle write


C Binding

#include 

void cma_handle_assign ( cma_t_handle *handle1, cma_t_handle *handle2);

Arguments

handle1
Handle that is assigned to handle2.
handle2
Handle that receives the value from handle1.

Description

This routine assigns the value of a handle, or name, to an object. Handles are allocated by the user application. This routine allows you to copy a handle from one object to another.

When an object is created, the storage for the object is allocated and initialized, and a handle for the object is returned. The handle is the only means of referring to an object and performing routines on the object. Because objects are only accessed through handles, you can usually think of the handle as if it were the object itself.

Handles are meaningful only within a single process address space. Attempting to access an object from a process other than the one in which it was created-for example, by means of multiply mapped memory-can result in unpredictable results (it is incorrect, but the error is not necessarily checked).

Exceptions

None



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]