Last March, I made a suggestion to this list:  That the many functions
which are cancellation points, but would otherwise never throw C++
exceptions, be marked with a "__THROW_CP" macro.  This would be a no-op on
threaded builds of uClibc, but would be equivalent to __THROW for a
threadless build.

This would produce a tiny optimization boost for threadless builds, and
more importantly, would make the include files much clearer.  No longer
will every tenth line be part of a comment explaining why __THROW is not
applied to a given function.

There was no response, probably because while the idea is simple, it
requires a lot of typing to implement.  Well, I'm back, having done the
work.

I now have a patch available at:

ftp://ftp.ocis.net/pub/users/ldeutsch/beta/uClibc-0.9.30-throwcp.diff

The patch adds "__THROW_CP", and applies it to every function previously
having a "such-and-such is a cancellation point and so not marked with
__THROW" comment.  Additionally, fputw(), fgetw(), and BSD sigpause() have
been marked __THROW_CP.  sigpause() was formerly __THROW, which looked
wrong to me.

I'm "dogfooding" the patch, but that doesn't really count for much since
I don't use C++.  I'd be interested to see any heavy-duty exception users
try it out, both to see if it helps the unthreaded case, and verify it
does not break the multithreaded case.

---- Michael Deutschmann <[EMAIL PROTECTED]>
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to