core/ThreadSupport.cpp
changeset 1084 241c1b9b4048
child 1094 3266175c0e29
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/core/ThreadSupport.cpp	Mon Jul 09 16:10:23 2007 +0000
     1.3 @@ -0,0 +1,35 @@
     1.4 +/**
     1.5 + * vim: set ts=4 :
     1.6 + * ===============================================================
     1.7 + * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
     1.8 + * ===============================================================
     1.9 + *
    1.10 + * This file is not open source and may not be copied without explicit
    1.11 + * written permission of AlliedModders LLC.  This file may not be redistributed 
    1.12 + * in whole or significant part.
    1.13 + * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
    1.14 + *
    1.15 + * Version: $Id$
    1.16 + */
    1.17 +
    1.18 +#include "ThreadSupport.h"
    1.19 +#include "sm_globals.h"
    1.20 +#include "ShareSys.h"
    1.21 +
    1.22 +#if defined PLATFORM_POSIX
    1.23 +#include "thread/PosixThreads.h"
    1.24 +#elif defined PLATFORM_WINDOWS
    1.25 +#include "thread/WinThreads.h"
    1.26 +#endif
    1.27 +
    1.28 +MainThreader g_MainThreader;
    1.29 +IThreader *g_pThreader = &g_MainThreader;
    1.30 +
    1.31 +class RegThreadStuff : public SMGlobalClass
    1.32 +{
    1.33 +public:
    1.34 +	void OnSourceModAllInitialized()
    1.35 +	{
    1.36 +		g_ShareSys.AddInterface(NULL, g_pThreader);
    1.37 +	}
    1.38 +};