aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r--src/lanes.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp
index 8033de7..6eec8c4 100644
--- a/src/lanes.cpp
+++ b/src/lanes.cpp
@@ -588,19 +588,21 @@ LUAG_FUNC(wakeup_conv)
588 588
589extern LUAG_FUNC(linda); 589extern LUAG_FUNC(linda);
590 590
591namespace global { 591namespace {
592 static struct luaL_Reg const sLanesFunctions[] = { 592 namespace local {
593 { "linda", LG_linda }, 593 static struct luaL_Reg const sLanesFunctions[] = {
594 { "now_secs", LG_now_secs }, 594 { "linda", LG_linda },
595 { "wakeup_conv", LG_wakeup_conv }, 595 { "now_secs", LG_now_secs },
596 { "set_thread_priority", LG_set_thread_priority }, 596 { "wakeup_conv", LG_wakeup_conv },
597 { "set_thread_affinity", LG_set_thread_affinity }, 597 { "set_thread_priority", LG_set_thread_priority },
598 { "nameof", luaG_nameof }, 598 { "set_thread_affinity", LG_set_thread_affinity },
599 { "register", LG_register }, 599 { "nameof", luaG_nameof },
600 { "set_singlethreaded", LG_set_singlethreaded }, 600 { "register", LG_register },
601 { nullptr, nullptr } 601 { "set_singlethreaded", LG_set_singlethreaded },
602 }; 602 { nullptr, nullptr }
603} // namespace global 603 };
604 } // namespace local
605} // namespace
604 606
605// ################################################################################################# 607// #################################################################################################
606 608
@@ -686,7 +688,7 @@ LUAG_FUNC(configure)
686 lua_pushnil(L_); // L_: settings M nil 688 lua_pushnil(L_); // L_: settings M nil
687 lua_setfield(L_, -2, "configure"); // L_: settings M 689 lua_setfield(L_, -2, "configure"); // L_: settings M
688 // add functions to the module's table 690 // add functions to the module's table
689 luaG_registerlibfuncs(L_, global::sLanesFunctions); 691 luaG_registerlibfuncs(L_, local::sLanesFunctions);
690 692
691 // register core.threads() only if settings say it should be available 693 // register core.threads() only if settings say it should be available
692 if (_U->tracker.isActive()) { 694 if (_U->tracker.isActive()) {