(file) Return to main.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / vxworks / ctors

File: [Pegasus] / pegasus / vxworks / ctors / Attic / main.cpp (download)
Revision: 1.1.2.1, Sat Dec 1 18:23:24 2007 UTC (16 years, 7 months ago) by mike
Branch: TASK-PEP305_VXWORKS-branch
CVS Tags: TASK-PEP305_VXWORKS-branch-beta2, TASK-PEP305_VXWORKS-2008-10-23
Changes since 1.1: +30 -0 lines
PEP#: 305
TITLE: VxWorks Port

DESCRIPTION: Ongoing VxWorks porting.

#include <cstdio>
#include <cassert>

class Global
{
public:

    Global()
    {
        magic = 0xCCCCCCCC;
    }

    ~Global()
    {
        magic = 0xDDDDDDDD;
    }

    static unsigned int magic;
};

unsigned int Global::magic = 0x00000000;

static Global _global;

// VxWorks entry point:
extern "C" void test_ctors()
{
    assert(Global::magic == 0xCCCCCCCC);
    printf("Global constructors okay\n");
}

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2