1
0
Fork 0
forked from len0rd/rockbox

Don't enter cpu sleep during disk operations

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3530 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2003-04-11 07:43:04 +00:00
parent ac3dfb8134
commit cf92db153f

View file

@ -112,8 +112,7 @@ static int wait_for_bsy(void)
int timeout = current_tick + HZ*10;
last_disk_activity = timeout;
while (TIME_BEFORE(current_tick, timeout) && (ATA_ALT_STATUS & STATUS_BSY))
sleep_thread();
wake_up_thread();
yield();
if (TIME_BEFORE(current_tick, timeout))
return 1;
@ -132,10 +131,8 @@ static int wait_for_rdy(void)
timeout = current_tick + HZ*10;
last_disk_activity = timeout;
while (TIME_BEFORE(current_tick, timeout) &&
!(ATA_ALT_STATUS & STATUS_RDY))
sleep_thread();
wake_up_thread();
while (TIME_BEFORE(current_tick, timeout) && !(ATA_ALT_STATUS & STATUS_RDY))
yield();
if (TIME_BEFORE(current_tick, timeout))
return STATUS_RDY;