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

📄 cplusglob.cpp

📁 vxworks源码源码解读是学习vxworks的最佳途径
💻 CPP
字号:
/* cplusGlob.cpp - support for calling all linked C++ static ctors/dtors *//* Copyright 1993 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01f,17mar99,sn   made ctorsInitialized global and changed its name to                 linkedCtorsInitialized01e,17oct96,bjl  modified cplusCtorsLink to do nothing if it has already 		 been called01d,10oct94,srh  fixed interface between cplus[CD]torsLink and_[cd]tors arrays01c,18jun93,jdi  more doc cleanup.01b,03jun93,srh  doc cleanup01a,25apr93,srh  written*//** DESCRIPTION* This module provides interfaces to cplusCallCtors and cplusCallDtors* for C++ modules that are linked with VxWorks. These functions should* be called from usrRoot.** NOMANUAL*/#include "vxWorks.h"#include "cplusLib.h"extern VOIDFUNCPTR _ctors[];extern VOIDFUNCPTR _dtors[];/******************************************************************************** cplusCtorsLink - call all linked static constructors (C++)** This function calls constructors for all of the static objects linked* with a VxWorks bootable image.  When creating bootable applications,* this function should be called from usrRoot() to initialize all static* objects.  Correct operation depends on correctly munching the C++* modules that are linked with VxWorks.** RETURNS: N/A*/BOOL linkedCtorsInitialized = FALSE;extern "C" void cplusCtorsLink ()    {    if (!linkedCtorsInitialized)       {       cplusCallCtors (_ctors);       linkedCtorsInitialized = TRUE;       }    }/******************************************************************************** cplusDtorsLink - call all linked static destructors (C++)** This function calls destructors for all of the static objects linked* with a VxWorks bootable image.  When creating bootable applications,* this function should be called during system shutdown to decommission* all static objects.  Correct operation depends on correctly munching* the C++ modules that are linked with VxWorks.** RETURNS: N/A*/extern "C" void cplusDtorsLink ()    {    cplusCallDtors (_dtors);    }

⌨️ 快捷键说明

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