aboutsummaryrefslogtreecommitdiff
path: root/src/linda.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/linda.cpp')
-rw-r--r--src/linda.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/linda.cpp b/src/linda.cpp
index 14eba2d..37a74b0 100644
--- a/src/linda.cpp
+++ b/src/linda.cpp
@@ -256,7 +256,7 @@ LUAG_FUNC(linda_send)
256 } 256 }
257 257
258 // convert nils to some special non-nil sentinel in sent values 258 // convert nils to some special non-nil sentinel in sent values
259 keeper_toggle_nil_sentinels(L, key_i + 1, eLM_ToKeeper); 259 keeper_toggle_nil_sentinels(L, key_i + 1, LookupMode::ToKeeper);
260 bool ret{ false }; 260 bool ret{ false };
261 CancelRequest cancel{ CancelRequest::None }; 261 CancelRequest cancel{ CancelRequest::None };
262 int pushed{ 0 }; 262 int pushed{ 0 };
@@ -448,7 +448,7 @@ LUAG_FUNC(linda_receive)
448 { 448 {
449 ASSERT_L(pushed >= expected_pushed_min && pushed <= expected_pushed_max); 449 ASSERT_L(pushed >= expected_pushed_min && pushed <= expected_pushed_max);
450 // replace sentinels with real nils 450 // replace sentinels with real nils
451 keeper_toggle_nil_sentinels(L, lua_gettop(L) - pushed, eLM_FromKeeper); 451 keeper_toggle_nil_sentinels(L, lua_gettop(L) - pushed, LookupMode::FromKeeper);
452 // To be done from within the 'K' locking area 452 // To be done from within the 'K' locking area
453 // 453 //
454 SIGNAL_ALL(&linda->read_happened); 454 SIGNAL_ALL(&linda->read_happened);
@@ -527,7 +527,7 @@ LUAG_FUNC(linda_set)
527 if (has_value) 527 if (has_value)
528 { 528 {
529 // convert nils to some special non-nil sentinel in sent values 529 // convert nils to some special non-nil sentinel in sent values
530 keeper_toggle_nil_sentinels(L, 3, eLM_ToKeeper); 530 keeper_toggle_nil_sentinels(L, 3, LookupMode::ToKeeper);
531 } 531 }
532 pushed = keeper_call(linda->U, K->L, KEEPER_API(set), L, linda, 2); 532 pushed = keeper_call(linda->U, K->L, KEEPER_API(set), L, linda, 2);
533 if (pushed >= 0) // no error? 533 if (pushed >= 0) // no error?
@@ -603,7 +603,7 @@ LUAG_FUNC(linda_get)
603 pushed = keeper_call(linda->U, K->L, KEEPER_API(get), L, linda, 2); 603 pushed = keeper_call(linda->U, K->L, KEEPER_API(get), L, linda, 2);
604 if (pushed > 0) 604 if (pushed > 0)
605 { 605 {
606 keeper_toggle_nil_sentinels(L, lua_gettop(L) - pushed, eLM_FromKeeper); 606 keeper_toggle_nil_sentinels(L, lua_gettop(L) - pushed, LookupMode::FromKeeper);
607 } 607 }
608 } 608 }
609 else // linda is cancelled 609 else // linda is cancelled
@@ -843,7 +843,7 @@ static void* linda_id( lua_State* L, DeepOp op_)
843{ 843{
844 switch( op_) 844 switch( op_)
845 { 845 {
846 case eDO_new: 846 case DeepOp::New:
847 { 847 {
848 size_t name_len = 0; 848 size_t name_len = 0;
849 char const* linda_name = nullptr; 849 char const* linda_name = nullptr;
@@ -881,7 +881,7 @@ static void* linda_id( lua_State* L, DeepOp op_)
881 return linda; 881 return linda;
882 } 882 }
883 883
884 case eDO_delete: 884 case DeepOp::Delete:
885 { 885 {
886 Linda* const linda{ lua_tolightuserdata<Linda>(L, 1) }; 886 Linda* const linda{ lua_tolightuserdata<Linda>(L, 1) };
887 ASSERT_L(linda); 887 ASSERT_L(linda);
@@ -899,7 +899,7 @@ static void* linda_id( lua_State* L, DeepOp op_)
899 return nullptr; 899 return nullptr;
900 } 900 }
901 901
902 case eDO_metatable: 902 case DeepOp::Metatable:
903 { 903 {
904 STACK_CHECK_START_REL(L, 0); 904 STACK_CHECK_START_REL(L, 0);
905 lua_newtable(L); 905 lua_newtable(L);
@@ -970,7 +970,7 @@ static void* linda_id( lua_State* L, DeepOp op_)
970 return nullptr; 970 return nullptr;
971 } 971 }
972 972
973 case eDO_module: 973 case DeepOp::Module:
974 // linda is a special case because we know lanes must be loaded from the main lua state 974 // linda is a special case because we know lanes must be loaded from the main lua state
975 // to be able to ever get here, so we know it will remain loaded as long a the main state is around 975 // to be able to ever get here, so we know it will remain loaded as long a the main state is around
976 // in other words, forever. 976 // in other words, forever.