Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
caf93340
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
caf93340
编写于
7月 31, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-992]
上级
86fd70c2
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
23 addition
and
68 deletion
+23
-68
src/os/inc/os.h
src/os/inc/os.h
+0
-1
src/os/inc/osDarwin64.h
src/os/inc/osDarwin64.h
+1
-1
src/os/inc/osFile.h
src/os/inc/osFile.h
+2
-2
src/os/inc/osPthread.h
src/os/inc/osPthread.h
+0
-31
src/os/inc/osSemphone.h
src/os/inc/osSemphone.h
+4
-0
src/os/inc/osString.h
src/os/inc/osString.h
+2
-2
src/os/inc/osSysinfo.h
src/os/inc/osSysinfo.h
+1
-1
src/os/inc/osWindows64.h
src/os/inc/osWindows64.h
+2
-2
src/os/src/detail/osSemphone.c
src/os/src/detail/osSemphone.c
+0
-0
src/os/src/detail/osString.c
src/os/src/detail/osString.c
+11
-2
src/os/src/detail/osUtil.c
src/os/src/detail/osUtil.c
+0
-26
未找到文件。
src/os/inc/os.h
浏览文件 @
caf93340
...
...
@@ -51,7 +51,6 @@ extern "C" {
#include "osLz4.h"
#include "osMath.h"
#include "osMemory.h"
#include "osPthread.h"
#include "osRand.h"
#include "osSemphone.h"
#include "osSocket.h"
...
...
src/os/inc/osDarwin64.h
浏览文件 @
caf93340
...
...
@@ -85,7 +85,7 @@ int tsem_destroy(dispatch_semaphore_t *sem);
#define TAOS_OS_FUNC_SOCKET_SETSOCKETOPT
#define TAOS_OS_FUNC_SYSINFO
#define TAOS_OS_FUNC_TIMER
#define TAOS_OS_FUNC_
UTIL
#define TAOS_OS_FUNC_
STRING_STR2INT64
// specific
#define htobe64 htonll
...
...
src/os/inc/osFile.h
浏览文件 @
caf93340
...
...
@@ -51,11 +51,11 @@ int taosFSendFileImp(FILE* out_file, FILE* in_file, int64_t* offset, int32_t
#endif
#endif
int32_t
taosFileRename
(
char
*
fullPath
,
char
*
suffix
,
char
delimiter
,
char
**
dstPath
);
// TAOS_OS_FUNC_FILE_GETTMPFILEPATH
void
taosGetTmpfilePath
(
const
char
*
fileNamePrefix
,
char
*
dstPath
);
int32_t
taosFileRename
(
char
*
fullPath
,
char
*
suffix
,
char
delimiter
,
char
**
dstPath
);
#ifdef __cplusplus
}
#endif
...
...
src/os/inc/osPthread.h
已删除
100644 → 0
浏览文件 @
86fd70c2
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TDENGINE_OS_PTHREAD_H
#define TDENGINE_OS_PTHREAD_H
#ifdef __cplusplus
extern
"C"
{
#endif
// TAOS_OS_FUNC_PTHREAD
bool
taosCheckPthreadValid
(
pthread_t
thread
);
int64_t
taosGetPthreadId
();
#ifdef __cplusplus
}
#endif
#endif
src/os/inc/osSemphone.h
浏览文件 @
caf93340
...
...
@@ -28,6 +28,10 @@ extern "C" {
#define tsem_destroy sem_destroy
#endif
// TAOS_OS_FUNC_PTHREAD
bool
taosCheckPthreadValid
(
pthread_t
thread
);
int64_t
taosGetPthreadId
();
#ifdef __cplusplus
}
#endif
...
...
src/os/inc/osString.h
浏览文件 @
caf93340
...
...
@@ -29,7 +29,7 @@ extern "C" {
#define taosGetlineImp(lineptr, n, stream) getline(lineptr, n , stream)
#endif
#ifndef TAOS_OS_FUNC_WCHAR
#ifndef TAOS_OS_FUNC_
STRING_
WCHAR
#define twcslen wcslen
#endif
...
...
@@ -39,7 +39,7 @@ extern "C" {
(dst)[(size)-1] = 0; \
} while (0);
// TAOS_OS_FUNC_
UTIL
// TAOS_OS_FUNC_
STRING_STR2INT64
int64_t
tsosStr2int64
(
char
*
str
);
// USE_LIBICONV
...
...
src/os/inc/osSysinfo.h
浏览文件 @
caf93340
...
...
@@ -32,7 +32,7 @@ void taosPrintOsInfo();
int
taosSystem
(
const
char
*
cmd
)
;
void
taosKillSystem
();
// TAOS_OS_FUNC_CORE
// TAOS_OS_FUNC_
SYSINFO_
CORE
void
taosSetCoreDump
();
#ifdef __cplusplus
...
...
src/os/inc/osWindows64.h
浏览文件 @
caf93340
...
...
@@ -48,7 +48,7 @@
extern
"C"
{
#endif
#define TAOS_OS_FUNC_WCHAR
#define TAOS_OS_FUNC_
STRING_
WCHAR
#define TAOS_OS_FUNC_FILE
#define TAOS_OS_FUNC_SLEEP
#define TAOS_OS_FUNC_TIMER
...
...
@@ -65,7 +65,7 @@ extern "C" {
int32_t
BUILDIN_CTZL
(
uint64_t
val
);
int32_t
BUILDIN_CTZ
(
uint32_t
val
);
#define TAOS_OS_FUNC_
UTIL
#define TAOS_OS_FUNC_
STRING_STR2INT64
#ifdef _TD_GO_DLL_
int64_t
tsosStr2int64
(
char
*
str
);
uint64_t
htonll
(
uint64_t
val
);
...
...
src/os/src/detail/os
PThread
.c
→
src/os/src/detail/os
Semphone
.c
浏览文件 @
caf93340
文件已移动
src/os/src/detail/os
Wchar
.c
→
src/os/src/detail/os
String
.c
浏览文件 @
caf93340
...
...
@@ -18,7 +18,16 @@
#include "tglobal.h"
#include "taosdef.h"
#ifndef TAOS_OS_FUNC_WCHAR
#ifndef TAOS_OS_FUNC_STRING_STR2INT64
int64_t
tsosStr2int64
(
char
*
str
)
{
char
*
endptr
=
NULL
;
return
strtoll
(
str
,
&
endptr
,
10
);
}
#endif
#ifndef TAOS_OS_FUNC_STRING_WCHAR
int
tasoUcs4Compare
(
void
*
f1_ucs4
,
void
*
f2_ucs4
,
int
bytes
)
{
return
wcsncmp
((
wchar_t
*
)
f1_ucs4
,
(
wchar_t
*
)
f2_ucs4
,
bytes
/
TSDB_NCHAR_SIZE
);
...
...
@@ -120,4 +129,4 @@ char *taosCharsetReplace(char *charsetstr) {
}
return
strdup
(
charsetstr
);
}
\ No newline at end of file
}
src/os/src/detail/osUtil.c
已删除
100644 → 0
浏览文件 @
86fd70c2
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _DEFAULT_SOURCE
#include "os.h"
#ifndef TAOS_OS_FUNC_UTIL
int64_t
tsosStr2int64
(
char
*
str
)
{
char
*
endptr
=
NULL
;
return
strtoll
(
str
,
&
endptr
,
10
);
}
#endif
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录