On 06/06/07, Linus Nielsen Feltzing <[EMAIL PROTECTED]> wrote:
Jonathan Gordon wrote:
> Questions, comments?

I think it sounds like a good idea. The implementation looks clean and
simple.

1) Why this:

+#define register_ata_idle_func(f)       \
+        register_event_callback(EID_ATA_DISK_SPINUP, (event_callback)f)

Why not replace the calls in the ATA code?

because I just wanted to get it up and running, in the finished
version this wont be there.
2) Question:

> +            if (run)
> +                callbacks[i].function(NULL);

Is it always true that the callback wants a NULL argument in this case?

from the event_callback.h file "/* run - call the callback before removing
       it from the list, data will always be NULL */, this has to be
done because usually data would be a pointer to some meaningful data
for the event (the id3 struct for the current track possibly?) but
becuase its impossible to know what to pass, NULL is the safest way to
do it.

Also, I made a sight mistake, in the svn ata callback stuff registered
callbacks only get called once, so an extra param needs to be added to
the register function to say weather to call it once or every time.

Reply via email to