aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-05-14 14:48:07 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-05-14 14:48:07 +0200
commit7d24fb298abbc517c1c0ca185087fd9233a3b687 (patch)
tree22ad97cc93930cea7a1fe18b26c922431252fc4a /src
parent9589d1941671818f78d9894cfc9485054d62d122 (diff)
downloadlanes-7d24fb298abbc517c1c0ca185087fd9233a3b687.tar.gz
lanes-7d24fb298abbc517c1c0ca185087fd9233a3b687.tar.bz2
lanes-7d24fb298abbc517c1c0ca185087fd9233a3b687.zip
Almost nothing
Diffstat (limited to 'src')
-rw-r--r--src/deep.h4
-rw-r--r--src/lane.h2
-rw-r--r--src/lanes.lua3
-rw-r--r--src/linda.h7
-rw-r--r--src/tools.cpp1
5 files changed, 9 insertions, 8 deletions
diff --git a/src/deep.h b/src/deep.h
index 41df86f..87e5329 100644
--- a/src/deep.h
+++ b/src/deep.h
@@ -44,6 +44,8 @@ struct DeepPrelude
44 } 44 }
45}; 45};
46 46
47// #################################################################################################
48
47// external C modules should create a single object implementing that interface for each Deep userdata class they want to expose 49// external C modules should create a single object implementing that interface for each Deep userdata class they want to expose
48class DeepFactory 50class DeepFactory
49{ 51{
@@ -75,4 +77,6 @@ class DeepFactory
75 [[nodiscard]] static char const* PushDeepProxy(DestState L_, DeepPrelude* o_, int nuv_, LookupMode mode_); 77 [[nodiscard]] static char const* PushDeepProxy(DestState L_, DeepPrelude* o_, int nuv_, LookupMode mode_);
76}; 78};
77 79
80// #################################################################################################
81
78[[nodiscard]] DeepFactory* LookupFactory(lua_State* L_, int index_, LookupMode mode_); 82[[nodiscard]] DeepFactory* LookupFactory(lua_State* L_, int index_, LookupMode mode_);
diff --git a/src/lane.h b/src/lane.h
index f28a402..4094279 100644
--- a/src/lane.h
+++ b/src/lane.h
@@ -122,7 +122,7 @@ class Lane
122 void pushThreadStatus(lua_State* L_) const; 122 void pushThreadStatus(lua_State* L_) const;
123 void securizeDebugName(lua_State* L_); 123 void securizeDebugName(lua_State* L_);
124 void startThread(int priority_); 124 void startThread(int priority_);
125 char const* threadStatusString() const; 125 [[nodiscard]] char const* threadStatusString() const;
126 [[nodiscard]] bool waitForCompletion(std::chrono::time_point<std::chrono::steady_clock> until_); 126 [[nodiscard]] bool waitForCompletion(std::chrono::time_point<std::chrono::steady_clock> until_);
127 127
128 static void PushMetatable(lua_State* L_); 128 static void PushMetatable(lua_State* L_);
diff --git a/src/lanes.lua b/src/lanes.lua
index 0ab6661..05275de 100644
--- a/src/lanes.lua
+++ b/src/lanes.lua
@@ -396,7 +396,6 @@ local configure_timers = function()
396 -- remains. 396 -- remains.
397 -- 397 --
398 local timer_body = function() 398 local timer_body = function()
399 set_debug_threadname("LanesTimer")
400 -- 399 --
401 -- { [deep_linda_lightuserdata]= { [deep_linda_lightuserdata]=linda_h, 400 -- { [deep_linda_lightuserdata]= { [deep_linda_lightuserdata]=linda_h,
402 -- [key]= { wakeup_secs [,period_secs] } [, ...] }, 401 -- [key]= { wakeup_secs [,period_secs] } [, ...] },
@@ -787,6 +786,7 @@ lanes.configure = function(settings_)
787 lanes.set_thread_priority = core.set_thread_priority 786 lanes.set_thread_priority = core.set_thread_priority
788 lanes.threads = core.threads or function() error "lane tracking is not available" end -- core.threads isn't registered if settings.track_lanes is false 787 lanes.threads = core.threads or function() error "lane tracking is not available" end -- core.threads isn't registered if settings.track_lanes is false
789 788
789 lanes.configure = nil -- no need to call configure() ever again
790 lanes.gen = gen 790 lanes.gen = gen
791 lanes.genatomic = genatomic 791 lanes.genatomic = genatomic
792 lanes.genlock = genlock 792 lanes.genlock = genlock
@@ -794,7 +794,6 @@ lanes.configure = function(settings_)
794 lanes.timer = timer 794 lanes.timer = timer
795 lanes.timer_lane = timer_lane 795 lanes.timer_lane = timer_lane
796 lanes.timers = timers 796 lanes.timers = timers
797 lanes.configure = nil -- no need to call configure() ever again
798 return lanes 797 return lanes
799end -- lanes.configure 798end -- lanes.configure
800 799
diff --git a/src/linda.h b/src/linda.h
index 56941a1..4943197 100644
--- a/src/linda.h
+++ b/src/linda.h
@@ -59,14 +59,13 @@ class Linda
59 Linda& operator=(Linda const&) = delete; 59 Linda& operator=(Linda const&) = delete;
60 Linda& operator=(Linda const&&) = delete; 60 Linda& operator=(Linda const&&) = delete;
61 61
62 [[nodiscard]] static int ProtectedCall(lua_State* L_, lua_CFunction f_);
63
64 private: 62 private:
65 void setName(char const* name_, size_t len_); 63 void setName(char const* name_, size_t len_);
66 64
67 public: 65 public:
68 [[nodiscard]] char const* getName() const;
69 [[nodiscard]] Keeper* whichKeeper() const { return U->keepers->nb_keepers ? &U->keepers->keeper_array[keeperIndex] : nullptr; }
70 [[nodiscard]] Keeper* acquireKeeper() const; 66 [[nodiscard]] Keeper* acquireKeeper() const;
67 [[nodiscard]] char const* getName() const;
71 void releaseKeeper(Keeper* keeper_) const; 68 void releaseKeeper(Keeper* keeper_) const;
69 [[nodiscard]] static int ProtectedCall(lua_State* L_, lua_CFunction f_);
70 [[nodiscard]] Keeper* whichKeeper() const { return U->keepers->nb_keepers ? &U->keepers->keeper_array[keeperIndex] : nullptr; }
72}; 71};
diff --git a/src/tools.cpp b/src/tools.cpp
index 3e6224a..0cfe1ab 100644
--- a/src/tools.cpp
+++ b/src/tools.cpp
@@ -523,4 +523,3 @@ int luaG_nameof(lua_State* L_)
523 lua_replace(L_, -3); // L_: "type" "result" 523 lua_replace(L_, -3); // L_: "type" "result"
524 return 2; 524 return 2;
525} 525}
526 \ No newline at end of file