MCPcopy Create free account
hub / github.com/apple/foundationdb / loadFunction

Function loadFunction

flow/Platform.actor.cpp:3486–3502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3484}
3485
3486void* loadFunction(void* lib, const char* func_name) {
3487 void* dlfcn = nullptr;
3488
3489#if defined(__unixish__)
3490 dlfcn = dlsym(lib, func_name);
3491 if (dlfcn == nullptr) {
3492 TraceEvent(SevWarn, "LoadFunctionFailed").detail("Function", func_name).detail("Error", dlerror());
3493 }
3494#else
3495 dlfcn = GetProcAddress((HINSTANCE)lib, func_name);
3496 if (dlfcn == nullptr) {
3497 TraceEvent(SevWarn, "LoadFunctionFailed").detail("Function", func_name).GetLastError();
3498 }
3499#endif
3500
3501 return dlfcn;
3502}
3503
3504void closeLibrary(void* handle) {
3505#ifdef __unixish__

Callers 3

ExternalWorkloadMethod · 0.85
loadPluginFunction · 0.85
loadClientFunctionFunction · 0.85

Calls 2

TraceEventClass · 0.85
detailMethod · 0.80

Tested by

no test coverage detected