core/ThreadSupport.cpp
author David Anderson <dvander@alliedmods.net>
Mon Jul 09 16:10:23 2007 +0000 (2007-07-09)
changeset 1084 241c1b9b4048
child 1094 3266175c0e29
permissions -rw-r--r--
added threader to core (not used yet)
     1 /**
     2  * vim: set ts=4 :
     3  * ===============================================================
     4  * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     5  * ===============================================================
     6  *
     7  * This file is not open source and may not be copied without explicit
     8  * written permission of AlliedModders LLC.  This file may not be redistributed 
     9  * in whole or significant part.
    10  * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
    11  *
    12  * Version: $Id$
    13  */
    14 
    15 #include "ThreadSupport.h"
    16 #include "sm_globals.h"
    17 #include "ShareSys.h"
    18 
    19 #if defined PLATFORM_POSIX
    20 #include "thread/PosixThreads.h"
    21 #elif defined PLATFORM_WINDOWS
    22 #include "thread/WinThreads.h"
    23 #endif
    24 
    25 MainThreader g_MainThreader;
    26 IThreader *g_pThreader = &g_MainThreader;
    27 
    28 class RegThreadStuff : public SMGlobalClass
    29 {
    30 public:
    31 	void OnSourceModAllInitialized()
    32 	{
    33 		g_ShareSys.AddInterface(NULL, g_pThreader);
    34 	}
    35 };