On Wed, 2012-10-10 at 09:23 +1100, Paul Mackerras wrote: > On Wed, Oct 10, 2012 at 01:20:37AM +1100, Michael Ellerman wrote: > > We have over 15 routines that implement essentially the same logic > > in terms of catching faults. Pull the logic out into two helper > > routines. > > > > The pattern becomes: > > > > if (start_bus_error_jump() == 0) { > > <do potentially faulting things> > > > > end_bus_error_jump(); > > } else { > > printf("Faulting thing faulted!\n"); > > } > > NAK... think about how setjmp() works. You can't return from the > function that called setjmp() while there is any possibility that > longjmp() could be called for the same jmp_buf.
Sigh, yeah. Somehow I'd convinced myself that it worked in this case, but after a night's sleep I'm not sure what my logic was. cheers _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev