src/thread_none.cpp
author Tero Marttila <terom@fixme.fi>
Fri, 18 Jul 2008 22:41:08 +0300
changeset 11177 6d9a43c48924
parent 10866 242436c016b8
permissions -rw-r--r--
set the GRFConfig's next ptr to NULL
10175
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
     1
/* $Id$ */
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
     2
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
     3
/** @file thread_none.cpp No-Threads-Available implementation of Threads */
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
     4
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
     5
#include "stdafx.h"
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
     6
#include "thread.h"
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
     7
#include "fiber.hpp"
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
     8
10866
242436c016b8 (svn r13417) -Fix (r12945, r13413): freeing the ThreadObjects in a manner that hopefully doesn't cause crashes.
rubidium
parents: 10861
diff changeset
     9
/* static */ ThreadObject *ThreadObject::New(OTTDThreadFunc proc, void *param)
10175
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    10
{
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    11
	return NULL;
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    12
}
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    13
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    14
/* static */ ThreadObject *ThreadObject::AttachCurrent()
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    15
{
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    16
	return NULL;
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    17
}
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    18
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    19
/* static */ uint ThreadObject::CurrentId()
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    20
{
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    21
	return -1;
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    22
}
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    23
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    24
/* static */ ThreadSemaphore *ThreadSemaphore::New()
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    25
{
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    26
	return NULL;
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    27
}
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    28
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    29
/* static */ Fiber *Fiber::New(FiberFunc proc, void *param)
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    30
{
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    31
	return NULL;
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    32
}
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    33
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    34
/* static */ Fiber *Fiber::AttachCurrent(void *param)
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    35
{
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    36
	return NULL;
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    37
}
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    38
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    39
/* static */ void *Fiber::GetCurrentFiberData()
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    40
{
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    41
	return NULL;
1119f6640ee6 (svn r12706) -Merge: the thread rewrite from NoAI. The rewrite makes the threading we have better extendable.
rubidium
parents:
diff changeset
    42
}