-
Ben Avison authored
The number of atexit callbacks you can register is now essentially unlimited. For module clients, the vector chain of callbacks is stored in the RMA, as was the previous fixed-size static buffer. Add a library atexit() function now that we have lots of room for one, and move _terminateio() call into it. This means that IO is properly cleaned up after every USR mode module entry, if it happens more than once to the same instantiation. Function pointers in the vector chain are now zeroed when called, which means the pointers won't be accidentally re-called after subsequent USR mode module entries. Note that there can now be holes left if USR mode and SVC mode atexit() calls were intermingled and one or more USR mode entry has completed. Neither atexit() nor at_quick_exit() callbacks are now issued after a call to abort().
e1a3a7f5