dvander@2726: /** dvander@2726: * vim: set ts=4 sw=4 : dvander@2726: * ============================================================================= dvander@2726: * SourceMod dvander@2726: * Copyright (C) 2004-2009 AlliedModders LLC. All rights reserved. dvander@2726: * ============================================================================= dvander@2726: * dvander@2726: * This program is free software; you can redistribute it and/or modify it under dvander@2726: * the terms of the GNU General Public License, version 3.0, as published by the dvander@2726: * Free Software Foundation. dvander@2726: * dvander@2726: * This program is distributed in the hope that it will be useful, but WITHOUT dvander@2726: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS dvander@2726: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more dvander@2726: * details. dvander@2726: * dvander@2726: * You should have received a copy of the GNU General Public License along with dvander@2726: * this program. If not, see . dvander@2726: * dvander@2726: * As a special exception, AlliedModders LLC gives you permission to link the dvander@2726: * code of this program (as well as its derivative works) to "Half-Life 2," the dvander@2726: * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software dvander@2726: * by the Valve Corporation. You must obey the GNU General Public License in dvander@2726: * all respects for all other code used. Additionally, AlliedModders LLC grants dvander@2726: * this exception to all derivative works. AlliedModders LLC defines further dvander@2726: * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), dvander@2726: * or . dvander@2726: * dvander@2726: * Version: $Id$ dvander@2726: */ dvander@2726: #include dvander@2726: #include "ThreadSupport.h" dvander@2726: #include "common_logic.h" dvander@2726: dvander@2726: #if defined PLATFORM_POSIX dvander@2726: #include "thread/PosixThreads.h" dvander@2726: #elif defined PLATFORM_WINDOWS dvander@2726: #include "thread/WinThreads.h" dvander@2726: #endif dvander@2726: dvander@2726: MainThreader g_MainThreader; dvander@2726: IThreader *g_pThreader = &g_MainThreader; dvander@2726: dvander@2726: class RegThreadStuff : public SMGlobalClass dvander@2726: { dvander@2726: public: dvander@2726: void OnSourceModAllInitialized() dvander@2726: { dvander@2726: sharesys->AddInterface(NULL, g_pThreader); dvander@2726: } dvander@2726: } s_RegThreadStuff; dvander@2726: