ublk-org / ublksrv

ublk: userspace block device driver
MIT License
149 stars 53 forks source link

Simplify C++ coroutine usage #38

Closed snarkmaster closed 1 year ago

snarkmaster commented 1 year ago

Use more standard coroutine constructs to make the code shorter & easier to follow.

I'm not a coro expert, but maybe some of this was necessary with older compilers. However, looking at RedHat:

Test Plan:

make
./tests/run_test.sh all 10 tests/tmp/
snarkmaster commented 1 year ago

Ok, I brought back the macro, but named it co_await__suspend_always(tag) so that it's somewhat clear what it does. Let me know what you think.