The C-ABI contract a hot-reloadable "logic" library exports, and the macro a plugin uses to export it. More...
Go to the source code of this file.
Namespaces | |
| namespace | pulp |
| namespace | pulp::format |
| What the product grants a device: the quota table indexed by capability tier and live thermal state. | |
| namespace | pulp::format::reload |
Macros | |
| #define | PULP_RELOAD_EXPORT extern "C" __attribute__((visibility("default"))) |
| #define | PULP_RELOAD_LOGIC(factory_expr) |
| Export the reload ABI from a logic translation unit. | |
Typedefs | |
| using | pulp::format::reload::ReloadAbiVersionFn = int (*)() |
| using | pulp::format::reload::ReloadFingerprintFn = void (*)(BuildFingerprint* out) |
| Fills *out with the logic library's own BuildFingerprint. | |
| using | pulp::format::reload::ReloadCreateFn = Processor* (*)() |
| Constructs the logic Processor; the caller takes ownership of the result. | |
| using | pulp::format::reload::ReloadDestroyFn = void (*)(Processor*) |
| Destroys a Processor returned by ReloadCreateFn, via the logic image's operator delete (reserved; see kDestroySymbol). | |
Variables | |
| constexpr int | pulp::format::reload::kReloadAbiVersion = 1 |
| Reload entry-point ABI version. | |
| constexpr const char * | pulp::format::reload::kAbiVersionSymbol = "pulp_reload_abi_version" |
| constexpr const char * | pulp::format::reload::kFingerprintSymbol = "pulp_reload_fingerprint" |
| constexpr const char * | pulp::format::reload::kCreateSymbol = "pulp_reload_create" |
| constexpr const char * | pulp::format::reload::kDestroySymbol = "pulp_reload_destroy" |
The C-ABI contract a hot-reloadable "logic" library exports, and the macro a plugin uses to export it.
A reloadable plugin is split into a thin shell (owns the audio thread, the StateStore, and the ProcessorHotSwapSlot) and a logic library (the DSP, built as a shared object). The shell dlopens the logic library and resolves these C entry points:
PULP_RELOAD_LOGIC(factory_expr) exports all four from a logic translation unit. The fingerprint is captured with the logic library's OWN compiler via the header-inline current_build_fingerprint(), which is the whole point.
| #define PULP_RELOAD_EXPORT extern "C" __attribute__((visibility("default"))) |
| #define PULP_RELOAD_LOGIC | ( | factory_expr | ) |
Export the reload ABI from a logic translation unit.
factory_expr must be a callable (or expression) yielding a pulp::format::Processor* the caller owns — typically new MyProcessor().
The exported symbol NAMES below must stay in sync with the k*Symbol string constants above (they are matched by name at dlsym time).