[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [RFC] setjmp.h dox

From: Theodore A. Roth
Subject: [avr-libc-dev] [RFC] setjmp.h dox
Date: Tue, 3 Sep 2002 22:57:43 -0700 (PDT)


Here's the dox for setjmp/longjmp. Looking through the source asm, things
seem to watch what the gnu man pages and Stevens say about these functions.

The only thing I question is the "The stack context will be invalidated if
the function which called setjmp() returns" statement.

Ok, now I think I see why the context is invalidated. If the function which
calls setjmp() returns and then you call longjmp(), a second return from the
env will cause you to pop an invalid return addr off the stack (since you
already returned once and popped the correct return addr). Correct?

Ted Roth

Attachment: avr-libc-setjmp-dox.diff
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]