Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e8890087
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e8890087
编写于
9月 30, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
include file for os module
上级
7af18fc9
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
84 addition
and
32 deletion
+84
-32
include/os/os.h
include/os/os.h
+5
-11
include/os/osAtomic.h
include/os/osAtomic.h
+3
-3
include/os/osDir.h
include/os/osDir.h
+3
-3
include/os/osRand.h
include/os/osRand.h
+3
-3
include/os/osSemaphore.h
include/os/osSemaphore.h
+3
-3
include/os/osSignal.h
include/os/osSignal.h
+30
-0
include/os/osSocket.h
include/os/osSocket.h
+1
-0
include/os/osString.h
include/os/osString.h
+3
-3
include/os/osTime.h
include/os/osTime.h
+3
-3
include/os/osTimer.h
include/os/osTimer.h
+30
-0
source/libs/transport/src/rpcTcp.c
source/libs/transport/src/rpcTcp.c
+0
-3
未找到文件。
include/os/os.h
浏览文件 @
e8890087
...
...
@@ -36,15 +36,6 @@ extern "C" {
#include <string.h>
#include <time.h>
// #include <arpa/inet.h>
// #include <fcntl.h>
// #include <pthread.h>
// // #include <sched.h>
//
// #include <signal.h>
// #include <sys/time.h>
// #include <unistd.h>
#include "osAtomic.h"
#include "osDef.h"
#include "osDir.h"
...
...
@@ -52,12 +43,15 @@ extern "C" {
#include "osFile.h"
#include "osMath.h"
#include "osMemory.h"
#include "osRand.h"
#include "osSemaphore.h"
#include "osSignal.h"
#include "osSleep.h"
#include "osSocket.h"
#include "osString.h"
#include "osSleep.h"
#include "osTime.h"
#include "osThread.h"
#include "osTime.h"
#include "osTimer.h"
#ifdef __cplusplus
}
...
...
include/os/osAtomic.h
浏览文件 @
e8890087
...
...
@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef
TDENGINE_OS_ATOMIC_H
#define
TDENGINE_OS_ATOMIC_H
#ifndef
_TD_OS_ATOMIC_H_
#define
_TD_OS_ATOMIC_H_
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -355,4 +355,4 @@ extern "C" {
}
#endif
#endif
#endif
/*_TD_OS_ATOMIC_H_*/
include/os/osDir.h
浏览文件 @
e8890087
...
...
@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef
TDENGINE_OS_DIR_H
#define
TDENGINE_OS_DIR_H
#ifndef
_TD_OS_DIR_H_
#define
_TD_OS_DIR_H_
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -31,4 +31,4 @@ int32_t taosCompressFile(char *srcFileName, char *destFileName);
}
#endif
#endif
#endif
/*_TD_OS_DIR_H_*/
include/os/osRand.h
浏览文件 @
e8890087
...
...
@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef
TDENGINE_OS_RAND_H
#define
TDENGINE_OS_RAND_H
#ifndef
_TD_OS_RAND_H_
#define
_TD_OS_RAND_H_
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -28,4 +28,4 @@ uint32_t taosSafeRand(void);
}
#endif
#endif
#endif
/*_TD_OS_RAND_H_*/
include/os/osSemaphore.h
浏览文件 @
e8890087
...
...
@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef
TDENGINE_OS_SEMAPHORE_H
#define
TDENGINE_OS_SEMAPHORE_H
#ifndef
_TD_OS_SEMPHONE_H_
#define
_TD_OS_SEMPHONE_H_
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -63,4 +63,4 @@ int32_t taosGetCurrentAPPName(char* name, int32_t* len);
}
#endif
#endif
#endif
/*_TD_OS_SEMPHONE_H_*/
include/os/osSignal.h
0 → 100644
浏览文件 @
e8890087
/*
* 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 _TD_OS_SIGNAL_H_
#define _TD_OS_SIGNAL_H_
#ifdef __cplusplus
extern
"C"
{
#endif
int32_t
taosInitTimer
(
void
(
*
callback
)(
int32_t
),
int32_t
ms
);
void
taosUninitTimer
();
#ifdef __cplusplus
}
#endif
#endif
/*_TD_OS_SIGNAL_H_*/
include/os/osSocket.h
浏览文件 @
e8890087
...
...
@@ -30,6 +30,7 @@ extern "C" {
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <sys/epoll.h>
#include <unistd.h>
#endif
...
...
include/os/osString.h
浏览文件 @
e8890087
...
...
@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef
TDENGINE_OS_STRING_H
#define
TDENGINE_OS_STRING_H
#ifndef
_TD_OS_STRING_H_
#define
_TD_OS_STRING_H_
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -51,4 +51,4 @@ char * taosCharsetReplace(char *charsetstr);
}
#endif
#endif
#endif
/*_TD_OS_STRING_H_*/
include/os/osTime.h
浏览文件 @
e8890087
...
...
@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef
TDENGINE_OS_TIME_H
#define
TDENGINE_OS_TIME_H
#ifndef
_TD_OS_TIME_H_
#define
_TD_OS_TIME_H_
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -55,4 +55,4 @@ int64_t convertTimePrecision(int64_t time, int32_t fromPrecision, int32_t toPrec
}
#endif
#endif /
/ TDENGINE_TTIME_H
#endif
/
*_TD_OS_TIME_H_*/
include/os/osTimer.h
0 → 100644
浏览文件 @
e8890087
/*
* 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 _TD_OS_TIMER_H_
#define _TD_OS_TIMER_H_
#ifdef __cplusplus
extern
"C"
{
#endif
int32_t
taosInitTimer
(
void
(
*
callback
)(
int32_t
),
int32_t
ms
);
void
taosUninitTimer
();
#ifdef __cplusplus
}
#endif
#endif
/*_TD_OS_TIMER_H_*/
source/libs/transport/src/rpcTcp.c
浏览文件 @
e8890087
...
...
@@ -22,9 +22,6 @@
#include "rpcHead.h"
#include "rpcTcp.h"
#include <sys/epoll.h>
typedef
struct
SFdObj
{
void
*
signature
;
SOCKET
fd
;
// TCP socket FD
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录