Skip to content

Commit b1cb519

Browse files
committed
Simplify implementation of fiber_wake_on_event()
Align fork-on-block implementation of fiber_wake_on_event() with that of fiber_sleep() and MicroBitLock::wait(). This patch has no impact on external behaviour, but introduces a consistent deisgn pattern for fork-on-block handling within the scheduler.
1 parent 69bf72e commit b1cb519

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

source/core/MicroBitFiber.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,7 @@ int fiber_wake_on_event(uint16_t id, uint16_t value)
428428
// If we're out of memory, there's nothing we can do.
429429
// keep running in the context of the current thread as a best effort.
430430
if (forkedFiber != NULL)
431-
{
432431
f = forkedFiber;
433-
dequeue_fiber(f);
434-
queue_fiber(f, &runQueue);
435-
schedule();
436-
}
437432
}
438433

439434
// Encode the event data in the context field. It's handy having a 32 bit core. :-)

0 commit comments

Comments
 (0)