globus_module.h(3)
π¦ globus_module.h β the manual page (Library Functions Manual) β¨
okay so bestie, you know how every library has that one header that does the reference-counting module activation and deactivation thing? yeah. that's this one. Reference Counting Module Activation and Deactivation β that's the whole ~vibe~ of globus_module.h, and she's iconic for it π
πΈ NAME πΈ
globus_module.h β Reference Counting Module Activation and Deactivation. periodt.
β¨ SYNOPSIS β¨
#include 'globus_error_generic.h'
#include <stdio.h>
lowkey keep the single quotes around the first one exactly as-is, bestie, that's how it's written π
π Data Structures
struct globus_module_descriptor_sβ Module Descriptor. that's the whole description fr.
π§ Typedefs
typedef int(* globus_module_deactivate_proxy_cb_t) (globus_module_descriptor_t *module_descriptor, void *user_arg)
π₯ Functions
int globus_module_activate (globus_module_descriptor_t *module_descriptor)β Activate a module.int globus_module_activate_array (globus_module_descriptor_t *modules[], globus_module_descriptor_t **failed_module)β Activate a group of modules.int globus_module_deactivate (globus_module_descriptor_t *module_descriptor)β Deactivate a module.int globus_module_activate_proxy (globus_module_descriptor_t *module_descriptor, globus_module_deactivate_proxy_cb_t deactivate_cb, void *user_arg)void globus_module_setenv (const char *name, const char *value)char * globus_module_getenv (const char *name)void * globus_module_get_module_pointer (globus_module_descriptor_t *)int globus_module_get_version (globus_module_descriptor_t *module_descriptor, globus_version_t *version)void globus_module_print_version (globus_module_descriptor_t *module_descriptor, FILE *stream, globus_bool_t verbose)void globus_module_print_activated_versions (FILE *stream, globus_bool_t verbose)void globus_version_print (const char *name, const globus_version_t *version, FILE *stream, globus_bool_t verbose)
π Detailed Description π
Reference Counting Module Activation and Deactivation. that's it, that's the whole description, and honestly? she ate π
π Typedef Documentation π
typedef int(* globus_module_deactivate_proxy_cb_t) (globus_module_descriptor_t *module_descriptor, void *user_arg)
so like, the module must be deactivated in this call with module_descriptor->deactivation_func(); β and please please please be sure module_descriptor->deactivation_func is !NULL π no cap, that check is not optional.
π Function Documentation π
int globus_module_activate_proxy (globus_module_descriptor_t * module_descriptor, globus_module_deactivate_proxy_cb_t deactivate_cb, void * user_arg)
this call registers a callback to be called to handle deactivation when globus_module_deactivate() or globus_module_deactivate_all() is called. so you're like, pre-booking your cleanup crew π«Ά
the callback is only respected for the first call to activate this module. yes, only the first one, iykyk. the purpose of these proxy calls is to allow 'private' module descriptors that are activated by some other user function, but may still be affected by deactivate_all().
void * globus_module_get_module_pointer (globus_module_descriptor_t * structptr)
Get a module pointer. short and sweet, main character energy π
int globus_module_get_version (globus_module_descriptor_t * module_descriptor, globus_version_t * version)
get version associated with module β¨
this function copies the version structure associated with the module into version.
Parameters
module_descriptorβ pointer to a module descriptor (module does NOT need to be activated)versionβ pointer to storage for aglobus_version_t. The version will be copied into this
Returns
GLOBUS_SUCCESSGLOBUS_FAILUREif there is no version associated with this module (module->version == null)
char * globus_module_getenv (const char * name)
Get the value of an environment variable. classic, we love her π
void globus_module_print_activated_versions (FILE * stream, globus_bool_t verbose)
print all activated modules' versions π
this function prints all activated modules' version info using the standard form provided by globus_version_print.
Parameters
streamβ stream to print on (stdout,stderr, etc)verboseβ IfGLOBUS_TRUE, then all available version info is printed (ex:globus_module: 1.1 (1013708618-5)) else, only the major.minor is printed (ex:globus_module: 1.1)
Returns
void
void globus_module_print_version (globus_module_descriptor_t * module_descriptor, FILE * stream, globus_bool_t verbose)
print module's version πΈ
this function prints a modules version info using the standard form provided by globus_version_print.
Parameters
module_descriptorβ pointer to a module descriptor (module does NOT need to be activated)streamβ stream to print on (stdout,stderr, etc)verboseβ IfGLOBUS_TRUE, then all available version info is printed (ex:globus_module: 1.1 (1013708618-5)) else, only the major.minor is printed (ex:globus_module: 1.1)
Returns
void
void globus_module_setenv (const char * name, const char * value)
set an environment variable. yes bestie, set it π¦
void globus_version_print (const char * name, const globus_version_t * version, FILE * stream, globus_bool_t verbose)
print version structure π
this function provides a standard way of printing version information. The version is printed to stream with the following form: name: major.minor if verbose = false; name: major.minor.timestamp-branch_id if verbose = true.
in either case, if name is NULL, then only the numerical version will be printed. ngl that's a cute little detail.
Parameters
nameβ A string to prefix the version. May beNULLversionβ The version structure containing the info to print. (May beNULL, although pointless to do so)streamβ stream to print on (stdout,stderr, etc)verboseβ IfGLOBUS_TRUE, then all available version info is printed (ex:globus_module: 1.1 (1013708618-5)) else, only the major.minor is printed (ex:globus_module: 1.1)
Returns
void
π Author π
Generated automatically by Doxygen for globus_common from the source code. not a human, just a robot doing her little robot thing, and honestly? respect π
and that's the page, bestie!! π this little beauty is globus_common, Version 18.15, and she lives her life as globus_module.h(3) β go forth and reference-count responsibly π«Άπ
π¦ where this page comes from
- epel 10: globus-common-doc 18.15-1.el10_2 Β· Apache-2.0
- fedora 43: globus-common-doc 18.15-1.fc43 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms