Scroll to navigation

globus_extension.h(3) globus_common globus_extension.h(3)

NAME

globus_extension.h - Globus Extension Modules.

SYNOPSIS

#include 'globus_common_include.h'
#include 'globus_module.h'
#include 'globus_hashtable.h'

Macros


#define GlobusExtensionDefineModule(name) globus_module_descriptor_t name##_module

Functions


int globus_extension_activate (const char *extension_name)
void * globus_extension_lookup (globus_extension_handle_t *handle, globus_extension_registry_t *registry, void *symbol)
int globus_extension_register_builtin (const char *extension_name, globus_module_descriptor_t *module_descriptor)

Detailed Description

Globus Extension Modules.

Macro Definition Documentation

#define GlobusExtensionDefineModule(name) globus_module_descriptor_t name##_module

Declare your module with the following.

Ex: GlobusExtensionDefineModule(my_module) = { 'my_module', globus_l_my_module_activate, globus_l_my_module_deactivate, NULL, NULL, &local_version };

Function Documentation

int globus_extension_activate (const char * extension_name)

loads the shared library 'libextension_name_flavor.so' from $GLOBUS_LOCATION/lib (or other location in LD_LIBRARY_PATH and activates the module defined within.

In the future, a configuration file will be supported allowing arbitrary extension names to be mapped to a specific library name.

Also, when builtin (compiled in) extensions are supported, this will activate those directly without needing to load the library.

Search order:

extension_name in mappings hash XXX not implemented
mapped name in builtin hash XXX not implemented
mapped name in dll hash XXX not implemented
load mapped name XXX not implemented
  • extension_name in builtin hash
  • extension_name in dll hash
  • load library if(strchr(extension_name, '/'))
concatenate / + dirname(extension_name) + /lib + basename(extension_name) + _<flavor>.so to $GLOBUS_LOCATION/lib and each search path in mappings file XXX not implemented (eg, for extension_name == wsrf/services/CounterService, load $GLOBUS_LOCATION/lib/wsrf/services/libCounterService_gcc32dbg.so)
lib + basename(entension_name) + _flavor.so subject to LD_LIBRARY_PATH else
load libextension_name_build_flavor subject to LD_LIBRARY_PATH

void* globus_extension_lookup (globus_extension_handle_t * handle, globus_extension_registry_t * registry, void * symbol)

Get the datum associated with symbol in this registry.

You MUST call globus_extension_release() when you are done using the data. the lookup() and release() calls handle the reference counting that prevents an extension from being unloaded while things it provides are being used. Do NOT call release() until you are done accessing the data from * the lookup() call.

release() could potentially block as a result of module deactivation and unloading. ensuring that globus_extension_deactivate() is not called with outstanding references will prevent that.

symbol is a char * by default. the key can be changed by calling globus_extension_registry_set_hashing() before it is accessed.

int globus_extension_register_builtin (const char * extension_name, globus_module_descriptor_t * module_descriptor)

hopefully in the future, these functions will only be needed by generated code

Author

Generated automatically by Doxygen for globus_common from the source code.

Tue Jul 5 2022 Version 18.13