mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby.h: simplify task state definitions using fiber state aliases
remove MRB_TASK_CREATED and MRB_TASK_STOPPED from mrb_fiber_state enum and define them as aliases to MRB_FIBER_CREATED and MRB_FIBER_TERMINATED. this makes the relationship between tasks and fibers clearer and avoids artificially extending the enum with semantically equivalent values. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -187,12 +187,12 @@ enum mrb_fiber_state {
|
||||
MRB_FIBER_SUSPENDED,
|
||||
MRB_FIBER_TRANSFERRED,
|
||||
MRB_FIBER_TERMINATED,
|
||||
#ifdef MRB_USE_TASK_SCHEDULER
|
||||
MRB_TASK_CREATED,
|
||||
MRB_TASK_STOPPED,
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Task context status aliases */
|
||||
#define MRB_TASK_CREATED MRB_FIBER_CREATED
|
||||
#define MRB_TASK_STOPPED MRB_FIBER_TERMINATED
|
||||
|
||||
struct mrb_context {
|
||||
struct mrb_context *prev;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user