| Summary: | remove references to atexit(), exit() and abort() from System module | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | Karl Wechsler <karl> |
| Component: | Runtime | Assignee: | Vikram Adiga <vikram.adiga> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | d-russo, sascha |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:3.26.00 | ||
|
Description
Karl Wechsler
If we remove the call to exit() from System_exit, we could still run atexitHandlers in a loop in System_exit, instead of relying on exit() to call System_rtsExit(), where the loop is currently run. However, CCS automatically sets a breakpoint at C$$EXIT, and if we don't call exit() we will not hit that code. SYS/BIOS regressions rely on the tests hitting C$$EXIT, but they could be changed to set a breakpoint at System_exit. Karl thinks that this bug raises too many small issues, and we should probably postpone it. The usage of exit() and abort() in System module is now configurable. The System Module contains configurable variables which can be set to point to user defined abort() and exit() implementation to avoid the large footprint from C Standard APIs. This allows backward compatibility though atexit() is no longer used. The atexit() was used to connect the System_atexit()'s to atexit() so that all functions bound via atexit() or System_atexit() were processed when exit() or System_exit(). Now, it users responsibility to connect the System_atexit() to atexit(). This has been fixed in xdc-A03 verified by code review. also verified the .map file for a few .out files and atexit() is gone. verify pass. - shipped in 3.30.0 |