Re: exception in a device driver

Anthony Barbachan (barbacha@Hinako.AMBusiness.com)
Mon, 4 Jan 1999 04:22:05 -0500


-----Original Message-----
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Manfred Spraul <masp0008@stud.uni-sb.de>
Cc: linux-kernel@vger.rutgers.edu <linux-kernel@vger.rutgers.edu>
Date: Sunday, January 03, 1999 6:12 AM
Subject: Re: exception in a device driver

>> I'm porting an existing device driver from WinNT to Linux.
>> The device driver uses try/catch/throw extensivly.
>>
>> Is anything like that supported under Linux?
>>
>> If I use .cpp files and "try { } catch { }", then I get
>> "unresolved symbol __throw" when I try to load the module.
>
>Thats likely to get very very hairy to try and support. Getting rid of
>the catch stuff for conventional error handling is probably a good move
>
>

There's also usually a huge amount of overhead associated with C++
exceptions, probably not a good idea for a Linux driver. Furthermore the
simpliar method of checking the returned value(s) of functions is also
easier to understand, read, and debug.

>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.rutgers.edu
>Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/