[Denali] Move signaling out of the command class.
This commit is contained in:
parent
d7c1022b7f
commit
28a0f02b05
6 changed files with 27 additions and 31 deletions
|
|
@ -21,9 +21,8 @@ glcr::Status DenaliServer::HandleRead(const ReadRequest& req,
|
|||
mmth::OwnedMemoryRegion::ContiguousPhysical(req.size() * 512, &paddr);
|
||||
|
||||
DmaReadCommand command(req.lba(), req.size(), paddr);
|
||||
device->IssueCommand(&command);
|
||||
|
||||
command.WaitComplete();
|
||||
ASSIGN_OR_RETURN(auto semaphore, device->IssueCommand(&command));
|
||||
semaphore->Wait();
|
||||
|
||||
resp.set_device_id(req.device_id());
|
||||
resp.set_size(req.size());
|
||||
|
|
@ -51,8 +50,8 @@ glcr::Status DenaliServer::HandleReadMany(const ReadManyRequest& req,
|
|||
uint64_t lba = req.lba().at(i);
|
||||
uint64_t size = req.sector_cnt().at(i);
|
||||
DmaReadCommand command(lba, size, region_paddr);
|
||||
device->IssueCommand(&command);
|
||||
command.WaitComplete();
|
||||
ASSIGN_OR_RETURN(auto semaphore, device->IssueCommand(&command));
|
||||
semaphore->Wait();
|
||||
|
||||
region_paddr += size * 512;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue