1.8.5 Library functions called from main()

The function main() can call a number of user-customizable functions in the C library.

The function main() is the user-level root of the application. It requires the execution environment to be initialized and input/output functions to be capable of being called. While in main() the program might perform one of the following actions that calls user-customizable functions in the C library:

  • Extend the stack or heap.

  • Call library functions that require a callout to a user-defined function, for example __rt_fp_status_addr() or clock().

  • Call library functions that use locale or CTYPE.

  • Perform floating-point calculations that require the floating-point unit or floating-point library.

  • Input or output directly through low-level functions, for example putc(), or indirectly through high-level input/output functions and input/output support functions, for example, fprintf() or sys_open().

  • Raise an error or other signal, for example ferror.

Non-ConfidentialPDF file icon PDF versionARM DUI0475M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.