__THROW and cancellation point patch.
Rob Landley
rob at landley.net
Mon Dec 8 23:57:27 UTC 2008
Vladimir, your dvv build does a lot with C++, any interest in trying to
reproduce it on a base system that has this patch installed?
On Wednesday 03 December 2008 21:19:59 Michael Deutschmann wrote:
> 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.
For C++ threadless builds, or for threadless builds in general?
I can test a threadless C build, and vladimir can test a threaded C++ build.
I don't know anybody who uses a C++ without thread support enabled, it seems
kind of like one of those "hot fudge sundae with a diet coke" type
combinations...
> 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.
What environments _are_ interesting to test?
Rob
More information about the uClibc
mailing list