Defines | |
#define | GLOBUS_NULL_HANDLE |
Typedefs | |
typedef globus_l_handle_table_s * | globus_handle_table_t |
Handle table abstract type. | |
typedef int | globus_handle_t |
Handle abstract type. | |
typedef void(*) | globus_handle_destructor_t (void *datum) |
Handle datum destructor. | |
Functions | |
int | globus_handle_table_init (globus_handle_table_t *handle_table, globus_handle_destructor_t destructor) |
int | globus_handle_table_destroy (globus_handle_table_t *handle_table) |
Destroy a handle table. | |
globus_handle_t | globus_handle_table_insert (globus_handle_table_t *handle_table, void *value, int initial_refs) |
globus_bool_t | globus_handle_table_increment_reference_by (globus_handle_table_t *handle_table, globus_handle_t handle, unsigned int inc) |
Increment the reference count for handle. | |
globus_bool_t | globus_handle_table_decrement_reference (globus_handle_table_t *handle_table, globus_handle_t handle) |
Remove a reference to a handle. | |
globus_bool_t | globus_handle_table_increment_reference (globus_handle_table_t *handle_table, globus_handle_t handle) |
Add a reference to a handle table entry. | |
void * | globus_handle_table_lookup (globus_handle_table_t *handle_table, globus_handle_t handle) |
Resolve a handle its datum. |
#define GLOBUS_NULL_HANDLE |
Invalid handle value
typedef void(*) globus_handle_destructor_t(void *datum) |
Handle datum destructor.
datum | Datum to destroy |
globus_bool_t globus_handle_table_decrement_reference | ( | globus_handle_table_t * | handle_table, | |
globus_handle_t | handle | |||
) |
Remove a reference to a handle.
Remove a reference to a handle table entry, calling its destructor if no more references exist for the handle.
handle_table | The table that the handle was created in. | |
handle | The handle to a datum to decrement the reference count for. |
int globus_handle_table_destroy | ( | globus_handle_table_t * | handle_table | ) |
Destroy a handle table.
Destroy a handle table and call the destructor for all objects associated with it.
handle_table | Pointer to the handle table to destroy |
globus_bool_t globus_handle_table_increment_reference | ( | globus_handle_table_t * | handle_table, | |
globus_handle_t | handle | |||
) |
Add a reference to a handle table entry.
handle_table | The table that the handle was created in. | |
handle | The handle to a datum to increment the reference count for. |
globus_bool_t globus_handle_table_increment_reference_by | ( | globus_handle_table_t * | handle_table, | |
globus_handle_t | handle, | |||
unsigned int | inc | |||
) |
Increment the reference count for handle.
handle_table | The table that the handle was created in. | |
handle | The handle to a datum to increment the reference count for. | |
inc | The number of references to add the handle. |
int globus_handle_table_init | ( | globus_handle_table_t * | handle_table, | |
globus_handle_destructor_t | destructor | |||
) |
Initialize a table of unique reference counted handles.
handle_table | the table of unique handles we want to use. | |
destructor | Function to call to free the data associated with a handle when the handle's reference count reaches 0 or the handle table is destroyed. |
globus_handle_t globus_handle_table_insert | ( | globus_handle_table_t * | handle_table, | |
void * | value, | |||
int | initial_refs | |||
) |
Insert a datum into a handle table
Insert a value into the handle table, and return a unique handle to it.
handle_table | Handle table to add the value to | |
value | The value to insert into the table | |
initial_refs | The initial reference count of this value in the table |
void* globus_handle_table_lookup | ( | globus_handle_table_t * | handle_table, | |
globus_handle_t | handle | |||
) |
Resolve a handle its datum.
handle_table | The table that the handle was created in. | |
handle | The handle to a datum to resolve |