This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setjmp in newlib and glibc


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]