This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: setjmp in newlib and glibc
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: pradip singh <pradip23 at rediffmail dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Thu, 10 Jul 2003 19:20:06 -0400
- Subject: Re: setjmp in newlib and glibc
- Organization: Red Hat Inc.
- References: <20030710142252.14234.qmail@webmail9.rediffmail.com>
pradip singh wrote:
Hello,
setjmp in glibc (glibc-2.3.2 ) internally calls sigsetjmp().
How the floating point environment getting stored there.
Why is it required ? Is there a specific reason for doing so ? What is
the logic behind making it a macro ?
Whereas Newlibs setjmp() implementation is straight forward.
Could anyone tell me the reason behind implementing the same?
sigsetjmp is a routine defined by the POSIX standard. It is setjmp()
plus additional logic for saving the signal mask. POSIX signal handling is
not simple and requires OS support whereas basic newlib is meant to be able to run on
embedded hardware without an underlying OS being required. Generic newlib does not have
sigsetjmp because it does not support the POSIX signal handling model. The ANSI
definition of setjmp/longjmp is quite straightforward.
Regarding questions you have about glibc, you should ask the glibc maintainers
on their mailing list.
-- Jeff J.
Thanks for the help.
Pradip Singh
___________________________________________________
Click below to experience Sooraj R Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik, Abhishek
& Kareena http://www.mpkdh.com