Example #1
0
bool InitProcess()
{
    if (ThreadInitializeIndex != OS_INVALID_TLS_INDEX) {
		//
		// Function is re-entrant.
		//
        return true;
	}

    ThreadInitializeIndex = OS_AllocTLSIndex();

    if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) {
        assert(0 && "InitProcess(): Failed to allocate TLS area for init flag");
        return false;
	}


    if (!InitializePoolIndex()) {
        assert(0 && "InitProcess(): Failed to initalize global pool");
        return false;
	}

    if (!InitializeParseContextIndex()) {
        assert(0 && "InitProcess(): Failed to initalize parse context");
        return false;
	}

	InitThread();
    return true;
}
Example #2
0
static bool InitProcess()
{
	if (s_ThreadInitialized != OS_INVALID_TLS_INDEX)
		return true;
	
	s_ThreadInitialized = OS_AllocTLSIndex();
	if (s_ThreadInitialized == OS_INVALID_TLS_INDEX)
	{
		assert(0 && "InitProcess(): Failed to allocate TLS area for init flag");
		return false;
	}
	
	if (!InitializePoolIndex())
	{
		assert(0 && "InitProcess(): Failed to initalize global pool");
		return false;
	}
	
	if (!InitializeParseContextIndex())
	{
		assert(0 && "InitProcess(): Failed to initalize parse context");
		return false;
	}
	
	InitThread();
	return true;
}
Example #3
0
bool InitProcess()
{
    if (!InitializePoolIndex()) {
        assert(0 && "InitProcess(): Failed to initalize global pool");
        return false;
    }

    if (!InitializeParseContextIndex()) {
        assert(0 && "InitProcess(): Failed to initalize parse context");
        return false;
    }

    return true;
}