Resumable function based device drivers and fibers #814
Replies: 2 comments 6 replies
-
Yes exactly, I think it would work without mayor problems. |
Beta Was this translation helpful? Give feedback.
-
This sounds quite interesting to me as we still have an unresolved issue in our own project, which is being discussed in #893. Specifically, we want to use a third-party filesystem for a NOR flash with resumable calls to the block device. Is the discussion of resumable function macros in terms of fibres still relevant and what is the outlook? I will happily contribute to this development! |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
we have tons of resumable function based device drivers, but have introduced fibers as our shiny new alternative concurrency mechanism. I was asking myself if it would be possible to implement a compatibility layer to use our present drivers without protothreads but with fibers.
Couldn't we just implement the resumable function macros in terms of fibers?
RF_WAIT_WHILE(x)
would becomewhile (x) modm::fiber::yield();
.RF_BEGIN/_END
would be no-ops,RF_RETURN(x)
is justreturn x;
, etc.Do you think that could work or am I overlooking something?
@salkinium
Beta Was this translation helpful? Give feedback.
All reactions