Browse Source

pause instruction for busy waiting

master
Mathieu Serandour 8 months ago
parent
commit
3c22535509
  1. 3
      kernel/drivers/nvme/nvme.c

3
kernel/drivers/nvme/nvme.c

@ -1036,7 +1036,7 @@ void nvme_sync_read(struct driver* this,
);
while(!queue_empty(&data->io_queues.sq))
;// sleep(0);
asm volatile("pause");
memcpy(
buf,
@ -1080,7 +1080,6 @@ void nvme_async_read(struct driver* this,
else
c = max_count;
while(queue_full(&data->io_queues.sq))
sleep(10);

Loading…
Cancel
Save