… | |
… | |
1329 | /* TODO: throwing up here is considered harmful */ |
1329 | /* TODO: throwing up here is considered harmful */ |
1330 | |
1330 | |
1331 | if (expect_true (prev != next)) |
1331 | if (expect_true (prev != next)) |
1332 | { |
1332 | { |
1333 | if (expect_false (!(prev->flags & (CF_RUNNING | CF_NEW)))) |
1333 | if (expect_false (!(prev->flags & (CF_RUNNING | CF_NEW)))) |
1334 | croak ("Coro::State::transfer called with non-running/new prev Coro::State, but can only transfer from running or new states,"); |
1334 | croak ("Coro::State::transfer called with a suspended prev Coro::State, but can only transfer from running or new states,"); |
1335 | |
1335 | |
1336 | if (expect_false (next->flags & CF_RUNNING)) |
1336 | if (expect_false (next->flags & CF_RUNNING)) |
1337 | croak ("Coro::State::transfer called with running next Coro::State, but can only transfer to inactive states,"); |
1337 | croak ("Coro::State::transfer called with running next Coro::State, but can only transfer to inactive states,"); |
1338 | |
1338 | |
1339 | if (expect_false (next->flags & CF_DESTROYED)) |
1339 | if (expect_false (next->flags & CF_DESTROYED)) |