aboutsummaryrefslogtreecommitdiff
path: root/src/cancel.h
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-03-28 18:28:51 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-03-28 18:28:51 +0100
commit749b9ed927929c3492def9a241a5267394306551 (patch)
tree77988d14b087a8381924e36a7bc08ed8c41939d2 /src/cancel.h
parent5d365d54efef5dfd0dca814346bfee791eacab90 (diff)
downloadlanes-749b9ed927929c3492def9a241a5267394306551.tar.gz
lanes-749b9ed927929c3492def9a241a5267394306551.tar.bz2
lanes-749b9ed927929c3492def9a241a5267394306551.zip
C++ migration: improved UniqueKey interface
Diffstat (limited to 'src/cancel.h')
-rw-r--r--src/cancel.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cancel.h b/src/cancel.h
index 9cd7d5b..481cca4 100644
--- a/src/cancel.h
+++ b/src/cancel.h
@@ -48,15 +48,12 @@ enum CancelOp
48// crc64/we of string "CANCEL_ERROR" generated at http://www.nitrxgen.net/hashgen/ 48// crc64/we of string "CANCEL_ERROR" generated at http://www.nitrxgen.net/hashgen/
49static constexpr UniqueKey CANCEL_ERROR{ 0xe97d41626cc97577ull }; // 'raise_cancel_error' sentinel 49static constexpr UniqueKey CANCEL_ERROR{ 0xe97d41626cc97577ull }; // 'raise_cancel_error' sentinel
50 50
51// crc64/we of string "CANCEL_TEST_KEY" generated at http://www.nitrxgen.net/hashgen/
52static constexpr UniqueKey CANCEL_TEST_KEY{ 0xe66f5960c57d133aull }; // used as registry key
53
54CancelResult thread_cancel(lua_State* L, Lane* lane_, CancelOp op_, double secs_, bool force_, double waitkill_timeout_); 51CancelResult thread_cancel(lua_State* L, Lane* lane_, CancelOp op_, double secs_, bool force_, double waitkill_timeout_);
55 52
56[[noreturn]] static inline void raise_cancel_error(lua_State* L) 53[[noreturn]] static inline void raise_cancel_error(lua_State* L)
57{ 54{
58 STACK_GROW(L, 1); 55 STACK_GROW(L, 1);
59 CANCEL_ERROR.push(L); // special error value 56 CANCEL_ERROR.pushKey(L); // special error value
60 raise_lua_error(L); // doesn't return 57 raise_lua_error(L); // doesn't return
61} 58}
62 59