Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
foreverneverer committed Oct 19, 2020
1 parent a677af4 commit d0bc147
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/aio/native_linux_aio_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,14 @@ error_code native_linux_aio_provider::aio_internal(aio_task *aio_tsk,
aio_context *aio_ctx = aio_tsk->get_aio_context();
error_code err = ERR_UNKNOWN;
uint32_t processed_bytes = 0;
if (aio_ctx->type == AIO_Read) {
switch (aio_ctx->type) {
case AIO_Read:
err = read(aio_ctx, &processed_bytes);
} else if (aio_ctx->type == AIO_Write) {
break;
case AIO_Write:
err = write(aio_ctx, &processed_bytes);
} else {
break;
default:
return err;
}

Expand All @@ -122,8 +125,8 @@ error_code native_linux_aio_provider::aio_internal(aio_task *aio_tsk,
if (async) {
complete_io(aio_tsk, err, processed_bytes);
} else {
std::unique_ptr<utils::notify_event> notify = std::make_unique<utils::notify_event>();
notify->notify();
utils::notify_event notify;
notify.notify();
}

return err;
Expand Down

0 comments on commit d0bc147

Please sign in to comment.