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] |
This matters because the current implementation of _exit() ignores its argument and always performs a SWI with ADP_StoppedApplicationExit, so the user (or simulator) will never know that an abort has occurred.
I didn't notice that the RDI implementation behaves differently than the RDP implementation of _exit, which does pass its argument on to the swi. In the RDP case, calling _exit explicitly makes it more apparent that abort is implemented in terms of _exit.
+ return errno = ENOSYS, -1;
Ugg! There is no need for clever coding here. Use two statements not a comma, it is much clearer that way. (There are several places where this applies).
I think of setting errno and returning -1 as a single conceptual operation, which is why I like the look of the above idiom, but fair enough.
+ (void)sig;
"(void)sig" ? What on earth ?
Casting to (void) is legal C and is a common idiom [1] to explicitly point out that the coder does not intend to use the value of any particular expression, not just an unused identifier.
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |