On 30/06/07, Peter P. wrote: > Gerhard Fiedler connectionbrazil.com> writes: > > Maybe his thought was that this is more hidden. I don't know. > > I think that the throw mechanism uses the error handler and any unwinding done > to reach it in flat mode, like longjmp() in C. longjmp() is one of the things > one is expressly warned not to use in an interrupted environment. As you know, > it uses a static data structure (or several). The C++ throw mechanism very > likely uses the same paradigm but in addition to longjmp the structure is hidden > from the programmer so he cannot guard it against a concurrent task. The structure is the one that stores where to longjmp to; exceptions most certainly don't have a longjmp-style target but rather have exception handler frames (.ehframe) sections in the executable that contain this information on a per-function basis, in a non-modifiable and hence reentrant way. Regards, Peter -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist