Lines Matching refs:mp
266 struct node_module* mp = reinterpret_cast<struct node_module*>(m);
268 if (mp->nm_flags & NM_F_INTERNAL) {
269 mp->nm_link = modlist_internal;
270 modlist_internal = mp;
274 mp->nm_flags = NM_F_LINKED;
275 mp->nm_link = modlist_linked;
276 modlist_linked = mp;
278 thread_local_modpending = mp;
396 void DLib::SaveInGlobalHandleMap(node_module* mp) {
398 global_handle_map.set(handle_, mp);
475 node_module* mp = thread_local_modpending;
489 if (mp != nullptr) {
490 if (mp->nm_context_register_func == nullptr) {
497 mp->nm_dso_handle = dlib->handle_;
498 dlib->SaveInGlobalHandleMap(mp);
512 mp = dlib->GetSavedModuleFromGlobalHandleMap();
513 if (mp == nullptr || mp->nm_context_register_func == nullptr) {
523 if ((mp->nm_version != -1) && (mp->nm_version != NODE_MODULE_VERSION)) {
532 const int actual_nm_version = mp->nm_version;
533 // NOTE: `mp` is allocated inside of the shared library's memory, calling
549 CHECK_EQ(mp->nm_flags & NM_F_BUILTIN, 0);
553 if (mp->nm_context_register_func != nullptr) {
554 mp->nm_context_register_func(exports, module, context, mp->nm_priv);
555 } else if (mp->nm_register_func != nullptr) {
556 mp->nm_register_func(exports, module, mp->nm_priv);
573 struct node_module* mp;
575 for (mp = list; mp != nullptr; mp = mp->nm_link) {
576 if (strcmp(mp->nm_modname, name) == 0) break;
579 CHECK(mp == nullptr || (mp->nm_flags & flag) != 0);
580 return mp;