Messages in this thread |  | | Date | Wed, 27 Sep 2000 16:14:39 -0500 | From | Timur Tabi <> | Subject | Re: Linux kernel modules development in C++ |
| |
** Reply to message from Alan Cox <alan@lxorguk.ukuu.org.uk> on Wed, 27 Sep 2000 22:00:54 +0100 (BST)
> > I have written the Windows platform version in C++ using Numega's tools > > encapsulating the driver code in classes. > > More of this classes isn't OS specific and it work well in any OS. > > And do you rely on any exception throwing ? > > If you use no exceptions (including thus using new and other constructors that > allocate) you should be ok.
I don't think any OS supports exception handling in a driver. It wouldn't make much sense, since there's no way for a driver to really "exit" (which is the ultimate destination of the exception).
By the way, new and delete are NOT exceptions. They are simply wrappers for malloc() and free(). Just define your own malloc and free (they can be wrappers for a kernel memory allocation API, or you can write your own heap manager), and new and delete work just fine.
-- Timur Tabi - ttabi@interactivesi.com Interactive Silicon - http://www.interactivesi.com
When replying to a mailing-list message, please don't cc: me, because then I'll just get two copies of the same message. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |