µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
atexit.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* exit_func_t) (void)
 

Enumerations

enum  __atexit_types {
  __et_atexit ,
  __et_onexit ,
  __et_cxa
}
 

Functions

void __call_exitprocs (int, void *)
 
int __register_exitproc (int, exit_func_t fn, void *, void *)
 
void os_run_fini_array (void)
 

Typedef Documentation

◆ exit_func_t

typedef void(* exit_func_t) (void)

Definition at line 39 of file atexit.h.

Enumeration Type Documentation

◆ __atexit_types

Enumerator
__et_atexit 
__et_onexit 
__et_cxa 

Definition at line 29 of file atexit.h.

30 {
31 __et_atexit, //
32 __et_onexit, //
34 };
@ __et_onexit
Definition atexit.h:32
@ __et_atexit
Definition atexit.h:31
@ __et_cxa
Definition atexit.h:33

Function Documentation

◆ __call_exitprocs()

void __call_exitprocs ( int  ,
void *   
)

Referenced by exit().

◆ __register_exitproc()

int __register_exitproc ( int  ,
exit_func_t  fn,
void *  ,
void *   
)

◆ os_run_fini_array()

void os_run_fini_array ( void  )

Definition at line 187 of file startup.cpp.

188{
189 trace_printf ("%s()\n", __func__);
190
192 for (int i = count; i > 0; i--)
193 {
194 __fini_array_start[i - 1]();
195 }
196
197 // If the application needs to run the code in the .fini section,
198 // please use the startup files, since this requires the code in
199 // crti.o and crtn.o to add the function prologue/epilogue.
200 //_fini(); // DO NOT ENABLE THIS!
201}
void(* __fini_array_start[])(void)
void(* __fini_array_end[])(void)
int trace_printf(const char *format,...)

References __fini_array_end, __fini_array_start, and trace_printf().

Referenced by exit().