YSTest: POSIXThread.cpp 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

POSIXThread.cpp
浏览该文件的文档.
1 /*
2 © 2014 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
29 #include "YCLib/YModules.h"
30 #include YFM_YCLib_POSIXThread
31
32 #if YF_Use_POSIXThread
33
34 namespace platform_ex
35 {
36
37 TLSKey::TLSKey(void(*dtor)(void*))
38 {
39 ::pthread_key_create(&key, dtor);
40 }
41 TLSKey::~TLSKey()
42 {
43 ::pthread_key_delete(key);
44 }
45
46 } // namespace YSLib;
47
48 #endif
49
platform_ex
平台扩展命名空间。
Definition: Android.h:46
YModules.h
YCLib 库模块配置文件。