# thread_none.cpp

Go to the documentation of this file.

    00001 /* $Id: thread_none.cpp 15266 2009-01-25 13:05:58Z smatz $ */
    00002
    00005 #include "stdafx.h"
    00006 #include "thread.h"
    00007
    00008 /* static */ bool ThreadObject::New(OTTDThreadFunc proc, void *param, ThreadObject **thread)
    00009 {
    00010   if (thread != NULL) *thread = NULL;
    00011   return false;
    00012 }
    00013
    00015 class ThreadMutex_None : public ThreadMutex {
    00016 public:
    00017   virtual void BeginCritical() {}
    00018   virtual void EndCritical() {}
    00019 };
    00020
    00021 /* static */ ThreadMutex *ThreadMutex::New()
    00022 {
    00023   return new ThreadMutex_None();
    00024 }