lkml.org 
[lkml]   [1999]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: C++ in kernel (was Re: exception in a device driver)
According to Oliver Xymoron:

> tmp=current->next();
> current->next(add);
> add->next(tmp);
> add->prev(current);
> if(tmp) tmp->prev(add);
>
> What happens to our list if _any_ of the above member functions throw an
> unexpected exception?

If your point is that destructor-based cleanup doesn't cover
everything -- well, it's a fair cop. But manual cleanup with 'try'
and 'catch' is the obvious case; I thought it was necessary to
demonstrate the destructor-based approach, since it covers lots of
things and is much easier to verify correct.
--
Chip Salzenberg - a.k.a. - <chip@perlsupport.com>
"When do you work?" "Whenever I'm not busy."

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.203 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site