Mac OS X' drivers are written in C++. I don't know whether this includes the video, but most likely. You've probably heard that OS X is based on FreeBSD on top of the Mach microkernel. That's the case but it has a driver architecture all its own.

A google search for "iokit" will turn up a lot of stuff. Also try searching for "darwin kernel".

It is actually written in a subset of C++ called Embedded C++. What Apple says is that RTTI, templates and exceptions are inappropriate for use in a real time system. I don't understand why, but some people feel that way. I think it means that you leave out all the really good stuff about C++.

You also don't really get to use constructors, you only have the default constructor and then you call a regular function to do the real initialization, so it can return an error code instead of throwing an exception as a nontrivial constructor might have to sometimes.

Here's EC++' homepage: http://www.caravan.net/ec2plus/

Here's what Bjarne Stroustrup has to say about EC++, I heartily agree with him:

http://www.research.att.com/~bs/bs_faq.html#EC++

One nice thing about OS X' IOKit is the way the kernel exposes APIs for user space access to the hardware. I have used this to write a firewire driver without the use of any kernel code, and also to write an application that queries for a bunch of information about the attached disk drives.

I hate to say it, but OS X does this by using Microsoft COM. What you do is supply a globally unique identifier and then it hands you back an interface that has a bunch of methods defined in it to do what you want. It's possible to have different versions of the interface for a given kind of device, for example new features are added to the firewire interface as OS X is updated.

OS X is nice to program. However, someone mentioned speed. I am not at all impressed by the speed of Mac OS X. Note that OS X is compiled with gcc.

For years I used a Mac 8500 with a PowerPC 604 150 MHz CPU. All the versions of the classic Mac OS I have used on it have performed well. I also used to run BeOS on it, and that performed even better.

However, OS X performs miserably on it. I even upgraded the CPU to a 350 MHz PowerPC CPU with a PowerLogix daughter card, and I can run it and stuff, but it is useless to do anything real, certainly not software development.

On the other hand, I now run Debian Woody for PowerPC with Linux kernel 2.4.19 on my 8500, and it works great. So Linux has brought new life to my 8500 where OS X was just a dead end.

I also have a 700 Mhz G3 iBook, and OS X is comfortable on it. But Mac OS 8.6 was comfortable on my 8500 when I had a 150 Mhz 604 in it.

Apple _is_ regularly improving the performance of OS X with each update. But BeOS is also a modern operating system, and it ran circles around the performance of today's OS X years ago.

I have read that one reason Apple purchased NeXT instead of Be, Inc. was that the less-efficient operating system would give Mac users a reason to have to buy new hardware.
--
Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting
http://www.goingware.com/
[EMAIL PROTECTED]


Tilting at Windmills for a Better Tomorrow.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to