diff options
Diffstat (limited to 'src/cancel.h')
-rw-r--r-- | src/cancel.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/cancel.h b/src/cancel.h index e7656ac..c7c5433 100644 --- a/src/cancel.h +++ b/src/cancel.h | |||
@@ -17,27 +17,27 @@ typedef struct s_Lane Lane; // forward | |||
17 | */ | 17 | */ |
18 | enum e_cancel_request | 18 | enum e_cancel_request |
19 | { | 19 | { |
20 | CANCEL_NONE, // no pending cancel request | 20 | CANCEL_NONE, // no pending cancel request |
21 | CANCEL_SOFT, // user wants the lane to cancel itself manually on cancel_test() | 21 | CANCEL_SOFT, // user wants the lane to cancel itself manually on cancel_test() |
22 | CANCEL_HARD // user wants the lane to be interrupted (meaning code won't return from those functions) from inside linda:send/receive calls | 22 | CANCEL_HARD // user wants the lane to be interrupted (meaning code won't return from those functions) from inside linda:send/receive calls |
23 | }; | 23 | }; |
24 | 24 | ||
25 | typedef enum | 25 | typedef enum |
26 | { | 26 | { |
27 | CR_Timeout, | 27 | CR_Timeout, |
28 | CR_Cancelled, | 28 | CR_Cancelled, |
29 | CR_Killed | 29 | CR_Killed |
30 | } cancel_result; | 30 | } cancel_result; |
31 | 31 | ||
32 | typedef enum | 32 | typedef enum |
33 | { | 33 | { |
34 | CO_Invalid = -2, | 34 | CO_Invalid = -2, |
35 | CO_Hard = -1, | 35 | CO_Hard = -1, |
36 | CO_Soft = 0, | 36 | CO_Soft = 0, |
37 | CO_Count = LUA_MASKCOUNT, | 37 | CO_Count = LUA_MASKCOUNT, |
38 | CO_Line = LUA_MASKLINE, | 38 | CO_Line = LUA_MASKLINE, |
39 | CO_Call = LUA_MASKCALL, | 39 | CO_Call = LUA_MASKCALL, |
40 | CO_Ret = LUA_MASKRET, | 40 | CO_Ret = LUA_MASKRET, |
41 | } CancelOp; | 41 | } CancelOp; |
42 | 42 | ||
43 | // crc64/we of string "CANCEL_ERROR" generated at http://www.nitrxgen.net/hashgen/ | 43 | // crc64/we of string "CANCEL_ERROR" generated at http://www.nitrxgen.net/hashgen/ |
@@ -50,9 +50,9 @@ cancel_result thread_cancel( lua_State* L, Lane* s, CancelOp op_, double secs_, | |||
50 | 50 | ||
51 | static inline int cancel_error( lua_State* L) | 51 | static inline int cancel_error( lua_State* L) |
52 | { | 52 | { |
53 | STACK_GROW( L, 1); | 53 | STACK_GROW( L, 1); |
54 | push_unique_key( L, CANCEL_ERROR); // special error value | 54 | push_unique_key( L, CANCEL_ERROR); // special error value |
55 | return lua_error( L); // doesn't return | 55 | return lua_error( L); // doesn't return |
56 | } | 56 | } |
57 | 57 | ||
58 | // ################################################################################################ | 58 | // ################################################################################################ |