Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
RISC_OSLib RISC_OSLib
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • RiscOS
    • SSources
  • Lib
  • RISC_OSLibRISC_OSLib
  • Merge requests
  • !25

Merged
Created Nov 21, 2022 by ROOL@rool🤖Owner

Add pre and post hooks for C++ applications

  • Overview 8
  • Commits 8
  • Pipelines 10
  • Changes 39

Ahead of a stable release of the OS, add runtime hooks for C++ applications who require a list of constructors to be called before main(), and list of destructors on any exit. The implementation comprises:

  • Extending the library's atexit() to allow the list of registered functions to be limited only by memory (+34 static entries)
  • Add ctor/dtor to the language descriptor table for a more generalised solution than previously proposed; previously this used 2 special weak symbols previously used by Arm, whereas now in principle other use cases could make use of the hooks
  • Run time check from client stubs that a new enough C library is present to offer these ctor/dtor facilities
  • In support of this:
    • Fix to closing down the I/O subsystem when a module application quits but then failed to restart it if the application restarted without an intervening module RMReInit
    • Various clarifications of the static data handling, its documentation, and safety in the use of adjacent static data locations
    • Reintstate some commented out RMEnsures in the stubs
    • Docs from an investigation on the use of language descriptors
    • Re-enable the static analysis phase
Edited Apr 19, 2023 by ROOL
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: CppSupport