Rockbox

Tasklist

FS#8947 - Add a stub in the simulator for ata_disk_is_active

Attached to Project: Rockbox
Opened by Bertrik Sikken (bertrik) - Monday, 28 April 2008, 22:43 GMT
Last edited by Bertrik Sikken (bertrik) - Thursday, 03 July 2008, 13:39 GMT
Task Type Patches
Category Simulator
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch adds a simulator stub for function ata_disk_is_active, allowing the removal of a bunch of #ifdef SIMULATOR macros.

The implementation of the stub is very simple and returns true once after ata_spin has been called and always returns false after ata_spindown has been called. We could make a more realistic simulation of active disk behaviour (e.g. with a timer) but I'd like to keep it simple and this implementation can return both true and false under specific conditions.
This task depends upon

Closed by  Bertrik Sikken (bertrik)
Thursday, 03 July 2008, 13:39 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed in r17927.
Comment by Jonathan Gordon (jdgordon) - Wednesday, 30 April 2008, 00:26 GMT
I like that you've tried to make it actually work, but doing it this way means it will only appear to be spinning the first time.

a better solution would be to remove it from the plugin api and fix battery bench to use the ata spindown callback (which is realy the only place where this is misused)
Comment by Bertrik Sikken (bertrik) - Saturday, 03 May 2008, 09:48 GMT
Synced against svn 17312.

Loading...