Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::app::deadstart::RegisterPriorityShutdownProc Function
C++
DEADSTART_PROC void DEADSTART_CALLTYPE RegisterPriorityShutdownProc(void(*)(void), CTEXTSTR, int, void* unused, CTEXTSTR, int);
Parameters 
Description 
void* unused 
this is an unused parameter. The macros fill it with &ThisRegisteringRoutine, so that the routine itself is referenced by code, and helps the compile not optimize out this code. The functions which perform the registration are prone to be optimized because it's hard for the compiler to identify that they are refernced by other names indirectly. 
function 
pointer to a function to call at shutdown. 
name 
text name of the function 
priority 
priority at which to call the function. 
file 
usually __FILE__ of the code doing this registration. 
line 
usually __LINE__ of the code doing this registration. 

Used by ATEXIT and PRIORITY_ATEXIT macros to register a shutdown routine at a specific priority. Higher number priorities are scheduled to run before lower number priorities. *backwards from PRELOAD priorities* This registers functions which are run while the program exits if it is at all able to run when exiting. calling exit() or BAG_Exit() will invoke these.

Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!