2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FBaseRt_ThreadManager.cpp
19 * @brief This is the implementation file for the _ThreadManager class.
27 #include <FBaseRtThread.h>
29 #include <FBaseSysLog.h>
30 #include "FBaseRt_ThreadManager.h"
31 #include "FBaseRt_ThreadImpl.h"
34 namespace Tizen { namespace Base { namespace Runtime
37 Thread* _ThreadManager::__pMainThread = null;
40 _ThreadManager::Initialize(void)
42 __pMainThread = new (std::nothrow) Thread;
43 SysTryLog(NID_BASE_RT, __pMainThread != null, "[E_OUT_OF_MEMORY] Unable to create Thread object");
45 result r = __pMainThread->Construct(L"MainThread", THREAD_TYPE_MAIN);
46 SysTryLog(NID_BASE_RT, !IsFailed(r), "[%s] Propagating.", GetErrorMessage(r));
48 __pMainThread->Start();
54 _ThreadManager::Finalize(void)
61 _ThreadManager::_ThreadManager(void)
65 _ThreadManager::~_ThreadManager(void)
69 } } } //Tizen::Base::Runtime