site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Hi Imran, Dan On 2 May 2005, at 10:14 AM, Imran Kazi wrote: Hi folks, I had written media filter scheme driver. I have implemented read/write routine in the driver. I am able to successfully write on the disk using this driver. Thanks in advance. Imran _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... IODelay() as a synchronization technique is a bit worrisome. Why not issue the read to your driver asynchronously, and once it completes and your callback is called, then issue the write, which is, of course, asynchronous to begin with? You can read a bit more about the concept of Completion Chaining in I/ O Kit Fundamentals. http://developer.apple.com/documentation/DeviceDrivers/Conceptual/ IOKitFundamentals/HandlingEvents/chapter_8_section_3.html#//apple_ref/ doc/uid/TP0000018-DontLinkElementID_180587 Actually i have to hold the write routine for a small time interval say (few seconds),so that i call the read routine of my driver and read the data on the disk and then call the write routine. I am doing this to read the data on the disk and copy it to some other disk before my original write routine modifies the data on the disk. I am using IODelay routine to delay my driver write routine for a few seconds. But because of IODelay function my read routine also gets delay as i am specifying IODelay before calling read routine. Is it possible to delay only write call and not the read call, so that I call my driver read routine to get the data on the disk and then call write routine??? This email sent to site_archiver@lists.apple.com
participants (1)
-
Dan Markarian