1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
//===- ThreadImpl.cpp -----------------------------------------------------===//
//
// The SkyPat team
//
// This file is distributed under the New BSD License.
// See LICENSE for details.
//
//===----------------------------------------------------------------------===//
#include <skypat/Thread/ThreadImpl.h>
#include <skypat/Config/Config.h>
using namespace skypat;
//===----------------------------------------------------------------------===//
// ThreadData
//===----------------------------------------------------------------------===//
void ThreadData::SetUp(ThreadData*& pData, Thread& pParent)
{
if (NULL != pData)
return;
pData = ThreadData::current();
pData->thread = &pParent;
}
//===----------------------------------------------------------------------===//
// ThreadImpl
//===----------------------------------------------------------------------===//
ThreadImpl::ThreadImpl(Thread* pParent)
: data(NULL), parent(pParent) {
}
ThreadImpl::~ThreadImpl()
{
}
void ThreadImpl::finish(void* pArg)
{
}
// Include the truly platform-specific parts.
#if defined(HAVE_PTHREAD)
#include "Pthread/ThreadImpl.inc"
#else
#include "Quick/ThreadImpl.inc"
#endif
|