core/logic/ThreadSupport.cpp
author Kyle Sanderson <kyle.leet@gmail.com>
Thu Jul 18 15:50:50 2013 -0400 (2013-07-18)
changeset 3950 d467a6526f8d
parent 2726 c96f3fab8211
permissions -rw-r--r--
Fixed accidental assignment in each of SDKTools and sp compiler (bug 5745, r=psychonic).
dvander@2726
     1
/**
dvander@2726
     2
 * vim: set ts=4 sw=4 :
dvander@2726
     3
 * =============================================================================
dvander@2726
     4
 * SourceMod
dvander@2726
     5
 * Copyright (C) 2004-2009 AlliedModders LLC.  All rights reserved.
dvander@2726
     6
 * =============================================================================
dvander@2726
     7
 *
dvander@2726
     8
 * This program is free software; you can redistribute it and/or modify it under
dvander@2726
     9
 * the terms of the GNU General Public License, version 3.0, as published by the
dvander@2726
    10
 * Free Software Foundation.
dvander@2726
    11
 * 
dvander@2726
    12
 * This program is distributed in the hope that it will be useful, but WITHOUT
dvander@2726
    13
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
dvander@2726
    14
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
dvander@2726
    15
 * details.
dvander@2726
    16
 *
dvander@2726
    17
 * You should have received a copy of the GNU General Public License along with
dvander@2726
    18
 * this program.  If not, see <http://www.gnu.org/licenses/>.
dvander@2726
    19
 *
dvander@2726
    20
 * As a special exception, AlliedModders LLC gives you permission to link the
dvander@2726
    21
 * code of this program (as well as its derivative works) to "Half-Life 2," the
dvander@2726
    22
 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
dvander@2726
    23
 * by the Valve Corporation.  You must obey the GNU General Public License in
dvander@2726
    24
 * all respects for all other code used.  Additionally, AlliedModders LLC grants
dvander@2726
    25
 * this exception to all derivative works.  AlliedModders LLC defines further
dvander@2726
    26
 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
dvander@2726
    27
 * or <http://www.sourcemod.net/license.php>.
dvander@2726
    28
 *
dvander@2726
    29
 * Version: $Id$
dvander@2726
    30
 */
dvander@2726
    31
#include <sm_platform.h>
dvander@2726
    32
#include "ThreadSupport.h"
dvander@2726
    33
#include "common_logic.h"
dvander@2726
    34
dvander@2726
    35
#if defined PLATFORM_POSIX
dvander@2726
    36
#include "thread/PosixThreads.h"
dvander@2726
    37
#elif defined PLATFORM_WINDOWS
dvander@2726
    38
#include "thread/WinThreads.h"
dvander@2726
    39
#endif
dvander@2726
    40
dvander@2726
    41
MainThreader g_MainThreader;
dvander@2726
    42
IThreader *g_pThreader = &g_MainThreader;
dvander@2726
    43
dvander@2726
    44
class RegThreadStuff : public SMGlobalClass
dvander@2726
    45
{
dvander@2726
    46
public:
dvander@2726
    47
	void OnSourceModAllInitialized()
dvander@2726
    48
	{
dvander@2726
    49
		sharesys->AddInterface(NULL, g_pThreader);
dvander@2726
    50
	}
dvander@2726
    51
} s_RegThreadStuff;
dvander@2726
    52