⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cplusxtors.cpp

📁 vxworks源码源码解读是学习vxworks的最佳途径
💻 CPP
字号:
/* cplusXtors.cpp - run time support for static ctors and dtors *//* Copyright 1993 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01c,03jun93,srh  doc cleanup01b,23apr93,srh  implemented new force-link/initialization scheme01a,31jan93,srh  written.*//*DESCRIPTIONThis module contains core run time support for static constructors anddestructors. It contains no user-callable routines.NOMANUAL*//* Includes */#include "vxWorks.h"#include "cplusLib.h"/* Defines *//* Typedefs *//* Globals */char __cplusXtors_o;/* Locals *//* Forward declarations *//******************************************************************************** cplusCallCtors - call static constructors** This routine takes a <ctors> array, as generated by the munch utility,* and calls the function which is pointed to by each entry. Each function* in the <ctors> array calls the static constructors for one compilation* unit. The functions are called in the first-to-last order.** NOMANUAL*/void cplusCallCtors    (    VOIDFUNCPTR *ctors		// array of pointers to ctor-calling functions    )    {    // call ctors in order    for (VOIDFUNCPTR *pVFP = ctors; *pVFP != 0; pVFP++)	{	(**pVFP)();	}    }/******************************************************************************** cplusCallDtors - call static destructors** This routine takes a <dtors> array, as generated by the munch utility,* and calls the function which is pointed to by each entry. Each function* in the <dtors> array calls the static destructors for one compilation* unit. The functions are called in the last-to-first order, reversing* the order in which the static constructors were originally called.** NOMANUAL*/void cplusCallDtors     (    VOIDFUNCPTR *dtors		// array of pointers to dtor-calling functions    )    {    // advance pVFP to end of dtors list    for (VOIDFUNCPTR *pVFP = dtors; *pVFP != 0; pVFP++)	{	}        // call dtors in reverse order of ctors    while (pVFP > dtors)	{	(**--pVFP)();	}    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -