Re: Question on Mass Storage driver IOMedia Objects
Re: Question on Mass Storage driver IOMedia Objects
- Subject: Re: Question on Mass Storage driver IOMedia Objects
- From: Mike Smith <email@hidden>
- Date: Thu, 6 Oct 2005 11:14:57 -0700
On Oct 6, 2005, at 7:13 AM, Yogesh P wrote:
I have implemented a Mass storage driver using IOStorage Class.
My driver succuessfully gets loaded and expose the IOMedia objects by
matching on the ContenHint property.
As I load the driver, I noticed that the write() call in the driver
gets
called after some specific time intervals. Is it that a correct
behaviour of my driver???
Assuming you have a filesystem on your media object, and this filesystem
is being mounted by the system, then it is normal for periodic updates
to the filesystem to be made, yes.
Does the write() routine in my driver is for all the media objects
that
are exposed by my driver or for a specific media???
The routine is associated with a specific instance of the media. You do
understand how object methods work, right?
If yes,then how should I implement a write() routine, so that it will
write only on specific media object exposed by my driver????
The routine has all of the per-instance variables in scope; the media
instance is also available as "this".
Is that my understanding is right or wrong???
If the above is not clear, I would encourage you to look at something
like
http://cvs.opendarwin.org/cgi-bin/cvsweb.cgi/projects/3ware/Driver/
EscaladeDrive.cpp?annotate=1.1
for a very simple example of the implementation of doAsyncReadWrite,
which is the most suitable method for you to implement for an IOMedia
provider.
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden