MySQL 8.0.40
Source Code Documentation
minimal_chassis.cc File Reference

Functions

 REQUIRES_SERVICE_PLACEHOLDER (mysql_rwlock_v1)
 
const mysql_service_mysql_psi_system_v1_t SERVICE_IMPLEMENTATION (mysql_minimal_chassis, mysql_psi_system_v1)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_psi_system_v1)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_runtime_error)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, registry)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, registry_registration)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, registry_query)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, registry_metadata_enumerate)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, registry_metadata_query)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, dynamic_loader)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, dynamic_loader_query)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, dynamic_loader_metadata_enumerate)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, dynamic_loader_metadata_query)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, dynamic_loader_scheme_file)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, mysql_runtime_error)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, mysql_rwlock_v1)
 
 PROVIDES_SERVICE (mysql_minimal_chassis, mysql_psi_system_v1)
 
 END_COMPONENT_PROVIDES ()
 
 END_COMPONENT_REQUIRES ()
 
 METADATA ("mysql.author", "Oracle Corporation")
 
 METADATA ("mysql.license", "GPL")
 
 END_COMPONENT_METADATA ()
 
bool minimal_chassis_init (mysql_service_registry_t **registry, mysql_component_t *comp_ref)
 This is the entry function for minimal_chassis static library, which has to be called by the application code. More...
 
bool minimal_chassis_deinit (mysql_service_registry_t *registry, mysql_component_t *comp_ref)
 This is the exit function for minimal_chassis static library, which has to be called just before the exit of the application. More...
 
void minimal_chassis_services_refresh (bool use_related)
 This function refreshes the global service handles based on the use_related flag. More...
 

Variables

const mysql_service_registry_t imp_mysql_minimal_chassis_registry
 
const mysql_service_mysql_rwlock_v1_t SERVICE_IMPLEMENTATION (mysql_minimal_chassis, mysql_rwlock_v1)
 
my_h_service h_err_service
 
const mysql_service_registry_registration_t imp_mysql_minimal_chassis_registry_registration
 
const mysql_service_registry_query_t imp_mysql_minimal_chassis_registry_query
 
const mysql_service_registry_metadata_enumerate_t imp_mysql_minimal_chassis_registry_metadata_enumerate
 
const mysql_service_registry_metadata_query_t imp_mysql_minimal_chassis_registry_metadata_query
 
const mysql_service_dynamic_loader_t imp_mysql_minimal_chassis_dynamic_loader
 
const mysql_service_dynamic_loader_query_t imp_mysql_minimal_chassis_dynamic_loader_query
 
const mysql_service_dynamic_loader_metadata_enumerate_t imp_mysql_minimal_chassis_dynamic_loader_metadata_enumerate
 
const mysql_service_dynamic_loader_metadata_query_t imp_mysql_minimal_chassis_dynamic_loader_metadata_query
 
const mysql_service_dynamic_loader_scheme_file_t imp_mysql_minimal_chassis_dynamic_loader_scheme_file
 
const mysql_service_mysql_runtime_error_t imp_mysql_minimal_chassis_mysql_runtime_error
 
mysql_component_t mysql_component_mysql_minimal_chassis
 

Function Documentation

◆ END_COMPONENT_METADATA()

END_COMPONENT_METADATA ( )

◆ END_COMPONENT_PROVIDES()

END_COMPONENT_PROVIDES ( )

◆ END_COMPONENT_REQUIRES()

END_COMPONENT_REQUIRES ( )

◆ METADATA() [1/2]

METADATA ( "mysql.author"  ,
"Oracle Corporation"   
)

◆ METADATA() [2/2]

METADATA ( "mysql.license"  ,
"GPL"   
)

◆ minimal_chassis_deinit()

bool minimal_chassis_deinit ( mysql_service_registry_t registry,
mysql_component_t comp_ref 
)

This is the exit function for minimal_chassis static library, which has to be called just before the exit of the application.

Releases the service registry and dynamic loader services. Releases the registry handle, which is acquired at the time of minimal_chassis_init(), if provided the handle address. And un-registers the component services, if provided component reference which is statically linked to this library.

Parameters
[in]registryA service handle to registry service.
[in]comp_refA component structure referance name.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

◆ minimal_chassis_init()

bool minimal_chassis_init ( mysql_service_registry_t **  registry,
mysql_component_t comp_ref 
)

This is the entry function for minimal_chassis static library, which has to be called by the application code.

Bootstraps service registry and dynamic loader. And registry handle will be assigned, if provided empty handle address. And loads provided component services into the registry, if provided component reference which is statically linked to this library.

Parameters
[out]registryA service handle to registry service.
[in]comp_refA component structure referance name.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

◆ minimal_chassis_services_refresh()

void minimal_chassis_services_refresh ( bool  use_related)

This function refreshes the global service handles based on the use_related flag.

The global services are mysql_runtime_error, mysql_psi_system_v1 and mysql_rwlock_v1. If the use_related is ON then the globals are loaded with minimal chassis service implementations else they are loaded with the default service implementations

Parameters
use_relatedUsed to decide which service implementation to load for globals.

◆ PROVIDES_SERVICE() [1/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
dynamic_loader   
)

◆ PROVIDES_SERVICE() [2/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
dynamic_loader_metadata_enumerate   
)

◆ PROVIDES_SERVICE() [3/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
dynamic_loader_metadata_query   
)

◆ PROVIDES_SERVICE() [4/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
dynamic_loader_query   
)

◆ PROVIDES_SERVICE() [5/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
dynamic_loader_scheme_file   
)

◆ PROVIDES_SERVICE() [6/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
mysql_psi_system_v1   
)

◆ PROVIDES_SERVICE() [7/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
mysql_runtime_error   
)

◆ PROVIDES_SERVICE() [8/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
mysql_rwlock_v1   
)

◆ PROVIDES_SERVICE() [9/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
registry   
)

◆ PROVIDES_SERVICE() [10/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
registry_metadata_enumerate   
)

◆ PROVIDES_SERVICE() [11/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
registry_metadata_query   
)

◆ PROVIDES_SERVICE() [12/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
registry_query   
)

◆ PROVIDES_SERVICE() [13/13]

PROVIDES_SERVICE ( mysql_minimal_chassis  ,
registry_registration   
)

◆ REQUIRES_SERVICE_PLACEHOLDER() [1/3]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_psi_system_v1  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [2/3]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_runtime_error  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [3/3]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_rwlock_v1  )

◆ SERVICE_IMPLEMENTATION()

const mysql_service_mysql_psi_system_v1_t SERVICE_IMPLEMENTATION ( mysql_minimal_chassis  ,
mysql_psi_system_v1   
)

Variable Documentation

◆ h_err_service

my_h_service h_err_service

◆ imp_mysql_minimal_chassis_dynamic_loader

const mysql_service_dynamic_loader_t imp_mysql_minimal_chassis_dynamic_loader
Initial value:
= {
static mysql_service_status_t load(const char *urns[], int component_count) noexcept
Loads specified group of Components by URN, initializes them and registers all Service Implementation...
Definition: dynamic_loader.cc:401
static mysql_service_status_t unload(const char *urns[], int component_count) noexcept
Unloads specified group of Components by URN, deinitializes them and unregisters all Service Implemen...
Definition: dynamic_loader.cc:449

◆ imp_mysql_minimal_chassis_dynamic_loader_metadata_enumerate

const mysql_service_dynamic_loader_metadata_enumerate_t imp_mysql_minimal_chassis_dynamic_loader_metadata_enumerate
Initial value:
= {
mysql_dynamic_loader_imp::metadata_iterator_create,
mysql_dynamic_loader_imp::metadata_iterator_get,
mysql_dynamic_loader_imp::metadata_iterator_next,
mysql_dynamic_loader_imp::metadata_iterator_is_valid,
mysql_dynamic_loader_imp::metadata_iterator_release
}

◆ imp_mysql_minimal_chassis_dynamic_loader_metadata_query

const mysql_service_dynamic_loader_metadata_query_t imp_mysql_minimal_chassis_dynamic_loader_metadata_query
Initial value:
= {
mysql_dynamic_loader_imp::metadata_get_value, }

◆ imp_mysql_minimal_chassis_dynamic_loader_query

const mysql_service_dynamic_loader_query_t imp_mysql_minimal_chassis_dynamic_loader_query
Initial value:
= {
static mysql_service_status_t iterator_is_valid(my_h_component_iterator iterator) noexcept
Checks if specified iterator is valid, i.e.
Definition: dynamic_loader.cc:605
static mysql_service_status_t iterator_get(my_h_component_iterator iterator, const char **out_name, const char **out_urn) noexcept
Gets name and URN of Service pointed to by iterator.
Definition: dynamic_loader.cc:544
static void iterator_release(my_h_component_iterator iterator) noexcept
Releases Component iterator.
Definition: dynamic_loader.cc:516
static mysql_service_status_t iterator_create(my_h_component_iterator *out_iterator) noexcept
Creates iterator that iterates through all loaded Components.
Definition: dynamic_loader.cc:490
static mysql_service_status_t iterator_next(my_h_component_iterator iterator) noexcept
Advances specified iterator to next element.
Definition: dynamic_loader.cc:578

◆ imp_mysql_minimal_chassis_dynamic_loader_scheme_file

const mysql_service_dynamic_loader_scheme_file_t imp_mysql_minimal_chassis_dynamic_loader_scheme_file
Initial value:
= {
static mysql_service_status_t unload(const char *urn) noexcept
Unloads file that was previously loaded.
Definition: dynamic_loader_scheme_file.cc:204
static mysql_service_status_t load(const char *urn, mysql_component_t **out_data) noexcept
Loads components that are located in executable file specified by URN.
Definition: dynamic_loader_scheme_file.cc:99

◆ imp_mysql_minimal_chassis_mysql_runtime_error

const mysql_service_mysql_runtime_error_t imp_mysql_minimal_chassis_mysql_runtime_error
Initial value:
= {
static void emit(int error_id, int flags, va_list args) noexcept
This function reports the given error to the caller.
Definition: minimal_chassis_runtime_error_imp.cc:29

◆ imp_mysql_minimal_chassis_registry

const mysql_service_registry_t imp_mysql_minimal_chassis_registry
Initial value:
= {
static mysql_service_status_t acquire(const char *service_name, my_h_service *out_service) noexcept
Finds and acquires a Service by name.
Definition: registry.cc:362
static mysql_service_status_t acquire_related(const char *service_name, my_h_service service, my_h_service *out_service) noexcept
Finds a Service by name.
Definition: registry.cc:384
static mysql_service_status_t release(my_h_service service) noexcept
Releases the Service Implementation previously acquired.
Definition: registry.cc:428

◆ imp_mysql_minimal_chassis_registry_metadata_enumerate

const mysql_service_registry_metadata_enumerate_t imp_mysql_minimal_chassis_registry_metadata_enumerate
Initial value:
= {
mysql_registry_imp::metadata_iterator_create,
mysql_registry_imp::metadata_iterator_get,
mysql_registry_imp::metadata_iterator_next,
mysql_registry_imp::metadata_iterator_is_valid,
mysql_registry_imp::metadata_iterator_release, }

◆ imp_mysql_minimal_chassis_registry_metadata_query

const mysql_service_registry_metadata_query_t imp_mysql_minimal_chassis_registry_metadata_query
Initial value:
= {
mysql_registry_imp::metadata_get_value, }

◆ imp_mysql_minimal_chassis_registry_query

const mysql_service_registry_query_t imp_mysql_minimal_chassis_registry_query
Initial value:
= {
static mysql_service_status_t iterator_get(my_h_service_iterator iterator, const char **out_name) noexcept
Gets name of Service pointed to by iterator.
Definition: registry.cc:589
static mysql_service_status_t iterator_is_valid(my_h_service_iterator iterator) noexcept
Checks if specified iterator is valid, i.e.
Definition: registry.cc:645
static mysql_service_status_t iterator_next(my_h_service_iterator iterator) noexcept
Advances specified iterator to next element.
Definition: registry.cc:619
static void iterator_release(my_h_service_iterator iterator) noexcept
Releases Service implementations iterator.
Definition: registry.cc:565
static mysql_service_status_t iterator_create(const char *service_name_pattern, my_h_service_iterator *out_iterator) noexcept
Creates iterator that iterates through all registered Service Implementations.
Definition: registry.cc:535

◆ imp_mysql_minimal_chassis_registry_registration

const mysql_service_registry_registration_t imp_mysql_minimal_chassis_registry_registration
Initial value:
= {
static mysql_service_status_t register_service(const char *service_implementation_name, my_h_service ptr) noexcept
Registers a new Service Implementation.
Definition: registry.cc:448
static mysql_service_status_t set_default(const char *service_implementation_name) noexcept
Sets new default Service Implementation for corresponding Service name.
Definition: registry.cc:486
static mysql_service_status_t unregister(const char *service_implementation_name) noexcept
Removes previously registered Service Implementation from registry.
Definition: registry.cc:469

◆ mysql_component_mysql_minimal_chassis

mysql_component_t mysql_component_mysql_minimal_chassis
Initial value:
= { "mysql_minimal_chassis" , __mysql_minimal_chassis_provides, __mysql_minimal_chassis_requires, __mysql_minimal_chassis_metadata,
nullptr, nullptr }

◆ SERVICE_IMPLEMENTATION

const mysql_service_mysql_psi_system_v1_t SERVICE_IMPLEMENTATION(mysql_minimal_chassis, mysql_psi_system_v1) ( mysql_minimal_chassis  ,
mysql_rwlock_v1   
)
extern