Compare commits
2 Commits
cb126a853e
...
7660bcab82
| Author | SHA1 | Date | |
|---|---|---|---|
| 7660bcab82 | |||
| 9346a10d74 |
@@ -286,6 +286,9 @@ DEFINE_DEVICE_OP (idedrv_read) {
|
||||
if (sector + sector_count > idedrv->sector_count)
|
||||
return -ST_OOB_ERROR;
|
||||
|
||||
if (idedrv->current_req != NULL)
|
||||
return -ST_TRY_AGAIN;
|
||||
|
||||
if (!ide_wait (idedrv->io, 100000, false, false))
|
||||
return -ST_XDRV_READ_ERROR;
|
||||
|
||||
@@ -347,6 +350,9 @@ DEFINE_DEVICE_OP (idedrv_write) {
|
||||
if (sector + sector_count > idedrv->sector_count)
|
||||
return -ST_OOB_ERROR;
|
||||
|
||||
if (idedrv->current_req != NULL)
|
||||
return -ST_TRY_AGAIN;
|
||||
|
||||
if (!ide_wait (idedrv->io, 100000, false, false))
|
||||
return -ST_XDRV_WRITE_ERROR;
|
||||
|
||||
|
||||
@@ -378,7 +378,11 @@ void proc_kill (struct proc* proc, struct reschedule_ctx* rctx) {
|
||||
}
|
||||
|
||||
void proc_wait_for (struct proc* proc, struct reschedule_ctx* rctx, struct proc* wait_proc) {
|
||||
uint64_t fwp;
|
||||
|
||||
spin_lock (&wait_proc->lock, &fwp);
|
||||
proc_sq_suspend (proc, &wait_proc->done_sq, NULL, 0, rctx, NULL, NULL);
|
||||
spin_unlock (&wait_proc->lock, fwp);
|
||||
}
|
||||
|
||||
void proc_irq_sched (void* arg, void* regs, bool user, struct reschedule_ctx* rctx) {
|
||||
|
||||
Reference in New Issue
Block a user