src/thread_none.cpp
author truebrain
Mon, 16 Jun 2008 14:43:19 +0000
branchnoai
changeset 10978 13fd0364b2c6
parent 10172 f93d3b7df6c8
permissions -rw-r--r--
(svn r13532) [NoAI] -Fix: in MultiPlayer SignID wasn't set correctly, causing weird effects. Code is now more unified, which should avoid simular effects in the future (tnx to glx for initial patch)
2285
3193cbd1ba88 (svn r2809) Implement more generic threading functions, which allow more than one thread
tron
parents:
diff changeset
     1
/* $Id$ */
3193cbd1ba88 (svn r2809) Implement more generic threading functions, which allow more than one thread
tron
parents:
diff changeset
     2
9857
7adb6a846add (svn r12529) [NoAI] -Change: split thread.cpp into 4 files, one for each OS
truebrain
parents: 9856
diff changeset
     3
/** @file thread_none.cpp No-Threads-Available implementation of Threads */
9574
698395509d12 (svn r9575) [NoAI] -Sync with trunk r9504:9574
glx
parents: 9544
diff changeset
     4
2285
3193cbd1ba88 (svn r2809) Implement more generic threading functions, which allow more than one thread
tron
parents:
diff changeset
     5
#include "stdafx.h"
3193cbd1ba88 (svn r2809) Implement more generic threading functions, which allow more than one thread
tron
parents:
diff changeset
     6
#include "thread.h"
10172
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
     7
#include "fiber.hpp"
9514
e31710af1ca0 (svn r9419) [NoAI] -Codechange: support AI threads also on Win32 (using threads on Win95 and fibers on other Win32 platforms)
KUDr
parents: 6573
diff changeset
     8
10172
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
     9
/* static */ ThreadObject *ThreadObject::New(OTTDThreadFunc proc, void *param)
10171
d4397d599d78 (svn r12702) [NoAI] -Codechange: some coding style cleanups.
rubidium
parents: 9857
diff changeset
    10
{
9857
7adb6a846add (svn r12529) [NoAI] -Change: split thread.cpp into 4 files, one for each OS
truebrain
parents: 9856
diff changeset
    11
	return NULL;
9514
e31710af1ca0 (svn r9419) [NoAI] -Codechange: support AI threads also on Win32 (using threads on Win95 and fibers on other Win32 platforms)
KUDr
parents: 6573
diff changeset
    12
}
e31710af1ca0 (svn r9419) [NoAI] -Codechange: support AI threads also on Win32 (using threads on Win95 and fibers on other Win32 platforms)
KUDr
parents: 6573
diff changeset
    13
10172
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    14
/* static */ ThreadObject *ThreadObject::AttachCurrent()
10171
d4397d599d78 (svn r12702) [NoAI] -Codechange: some coding style cleanups.
rubidium
parents: 9857
diff changeset
    15
{
9857
7adb6a846add (svn r12529) [NoAI] -Change: split thread.cpp into 4 files, one for each OS
truebrain
parents: 9856
diff changeset
    16
	return NULL;
4300
687a17c9c557 (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents: 4298
diff changeset
    17
}
9514
e31710af1ca0 (svn r9419) [NoAI] -Codechange: support AI threads also on Win32 (using threads on Win95 and fibers on other Win32 platforms)
KUDr
parents: 6573
diff changeset
    18
10172
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    19
/* static */ uint ThreadObject::CurrentId()
10171
d4397d599d78 (svn r12702) [NoAI] -Codechange: some coding style cleanups.
rubidium
parents: 9857
diff changeset
    20
{
10172
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    21
	return -1;
9514
e31710af1ca0 (svn r9419) [NoAI] -Codechange: support AI threads also on Win32 (using threads on Win95 and fibers on other Win32 platforms)
KUDr
parents: 6573
diff changeset
    22
}
10172
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    23
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    24
/* static */ ThreadSemaphore *ThreadSemaphore::New()
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    25
{
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    26
	return NULL;
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    27
}
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    28
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    29
/* static */ Fiber *Fiber::New(FiberFunc proc, void *param)
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    30
{
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    31
	return NULL;
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    32
}
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    33
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    34
/* static */ Fiber *Fiber::AttachCurrent(void *param)
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    35
{
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    36
	return NULL;
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    37
}
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    38
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    39
/* static */ void *Fiber::GetCurrentFiberData()
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    40
{
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    41
	return NULL;
f93d3b7df6c8 (svn r12703) [NoAI] -Codechange: move the remaining thread functions to use the new thread infrastructure.
rubidium
parents: 10171
diff changeset
    42
}