Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::app::deadstart::RegisterPriorityStartupProc Function
C++
DEADSTART_PROC void DEADSTART_CALLTYPE RegisterPriorityStartupProc(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 startup. 
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 PRELOAD and PRIORITY_PRELOAD macros to register a startup routine at a specific priority. Lower number priorities are scheduled to run before higher number priorities*backwards from ATEXIT priorities*. Using this scheduling mechanisms, routines which create threads under windows are guaranteed to run before main, and are guaranteed able to create threads. (They are outside of the loader lock)

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!