EasyManuals Logo

Texas Instruments TMS320 User Manual

Texas Instruments TMS320
288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #195 background imageLoading...
Page #195 background image
System Services
Memory and Low-level Functions 5-13
Example 5-10. Using SYS_abort with Optional Data Values
The single vargs parameter is of type va_list and represents the sequence of
arg parameters originally passed to SYS_abort. The function specified for the
Abort function property can pass the format and vargs parameters directly to
SYS_vprintf or SYS_vsprintf prior to terminating program execution. To avoid
the large code overhead of SYS_vprintf or SYS_vsprintf, you can use
LOG_error instead to simply print the format string.
SYS_exit likewise calls whatever function is bound to the Exit function
property, passing on its original status parameter. SYS_exit first executes a
set of handlers registered through the function SYS_atexit as described
Example 5-11.
Example 5-11. Using Handlers in SYS_exit
The function SYS_atexit provides a mechanism that enables you to stack up
to SYS_NUMHANDLERS (which is set to 8) clean-up routines as shown in
Example 5-12. The handlers are executed before SYS_exit calls the function
bound to the Exit function property. SYS_atexit returns FALSE when its
internal stack is full.
Example 5-12. Using Multiple SYS_NUMHANDLERS
(*(Abort_function)) (format, vargs)
(*handlerN)(status)
...
(*handler2)(status)
(*handler1)(status)
(*(Exit_function))(status)
Bool SYS_atexit(handler)
Fxn handler;

Table of Contents

Other manuals for Texas Instruments TMS320

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320 and is the answer not in the manual?

Texas Instruments TMS320 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320
CategoryComputer Hardware
LanguageEnglish

Related product manuals