Re: Simple Questions From MAC Beginner
Re: Simple Questions From MAC Beginner
- Subject: Re: Simple Questions From MAC Beginner
- From: Terry Lambert <email@hidden>
- Date: Wed, 24 Jun 2009 03:15:39 -0700
On Jun 24, 2009, at 1:35 AM, email@hidden wrote:
I am in the process of writing my first mac driver. I am struggling
with the documentation and am failing to find
the way to do some quite simple functions. I am writing a virtual cd/
dvd/bd hba. I found an example in the docs. I
already have a good scsi implemenation of a cdrom drive which I
wrote for other platforms.
1. I have a need to calculate elapsed time. Great resolution is not
required 100ths of a second will be fine. On
windows there is a function (KeQueryTickCount) which returns a timer
tick count. What is the equivalent function
in the Mac kernel?
This is probably as good a starting point as any:
<http://developer.apple.com/qa/qa2004/qa1398.html>
There's also a search engine there, along with lots of developer
information.
2. I need to read a file. I have a counted unicode string
containing a file path name. What are the functions I
should use to open, read, get length and close a file?
Don't do file I/O in the kernel; use a user space helper program
instead.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden