提交 e8890087 编写于 作者: S Shengliang Guan

include file for os module

上级 7af18fc9
...@@ -36,15 +36,6 @@ extern "C" { ...@@ -36,15 +36,6 @@ extern "C" {
#include <string.h> #include <string.h>
#include <time.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 "osAtomic.h"
#include "osDef.h" #include "osDef.h"
#include "osDir.h" #include "osDir.h"
...@@ -52,12 +43,15 @@ extern "C" { ...@@ -52,12 +43,15 @@ extern "C" {
#include "osFile.h" #include "osFile.h"
#include "osMath.h" #include "osMath.h"
#include "osMemory.h" #include "osMemory.h"
#include "osRand.h"
#include "osSemaphore.h" #include "osSemaphore.h"
#include "osSignal.h"
#include "osSleep.h"
#include "osSocket.h" #include "osSocket.h"
#include "osString.h" #include "osString.h"
#include "osSleep.h"
#include "osTime.h"
#include "osThread.h" #include "osThread.h"
#include "osTime.h"
#include "osTimer.h"
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TDENGINE_OS_ATOMIC_H #ifndef _TD_OS_ATOMIC_H_
#define TDENGINE_OS_ATOMIC_H #define _TD_OS_ATOMIC_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -355,4 +355,4 @@ extern "C" { ...@@ -355,4 +355,4 @@ extern "C" {
} }
#endif #endif
#endif #endif /*_TD_OS_ATOMIC_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TDENGINE_OS_DIR_H #ifndef _TD_OS_DIR_H_
#define TDENGINE_OS_DIR_H #define _TD_OS_DIR_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -31,4 +31,4 @@ int32_t taosCompressFile(char *srcFileName, char *destFileName); ...@@ -31,4 +31,4 @@ int32_t taosCompressFile(char *srcFileName, char *destFileName);
} }
#endif #endif
#endif #endif /*_TD_OS_DIR_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TDENGINE_OS_RAND_H #ifndef _TD_OS_RAND_H_
#define TDENGINE_OS_RAND_H #define _TD_OS_RAND_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -28,4 +28,4 @@ uint32_t taosSafeRand(void); ...@@ -28,4 +28,4 @@ uint32_t taosSafeRand(void);
} }
#endif #endif
#endif #endif /*_TD_OS_RAND_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TDENGINE_OS_SEMAPHORE_H #ifndef _TD_OS_SEMPHONE_H_
#define TDENGINE_OS_SEMAPHORE_H #define _TD_OS_SEMPHONE_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -63,4 +63,4 @@ int32_t taosGetCurrentAPPName(char* name, int32_t* len); ...@@ -63,4 +63,4 @@ int32_t taosGetCurrentAPPName(char* name, int32_t* len);
} }
#endif #endif
#endif #endif /*_TD_OS_SEMPHONE_H_*/
/*
* 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_*/
...@@ -30,6 +30,7 @@ extern "C" { ...@@ -30,6 +30,7 @@ extern "C" {
#include <netinet/ip.h> #include <netinet/ip.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>
#include <netinet/udp.h> #include <netinet/udp.h>
#include <sys/epoll.h>
#include <unistd.h> #include <unistd.h>
#endif #endif
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TDENGINE_OS_STRING_H #ifndef _TD_OS_STRING_H_
#define TDENGINE_OS_STRING_H #define _TD_OS_STRING_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -51,4 +51,4 @@ char * taosCharsetReplace(char *charsetstr); ...@@ -51,4 +51,4 @@ char * taosCharsetReplace(char *charsetstr);
} }
#endif #endif
#endif #endif /*_TD_OS_STRING_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TDENGINE_OS_TIME_H #ifndef _TD_OS_TIME_H_
#define TDENGINE_OS_TIME_H #define _TD_OS_TIME_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -55,4 +55,4 @@ int64_t convertTimePrecision(int64_t time, int32_t fromPrecision, int32_t toPrec ...@@ -55,4 +55,4 @@ int64_t convertTimePrecision(int64_t time, int32_t fromPrecision, int32_t toPrec
} }
#endif #endif
#endif // TDENGINE_TTIME_H #endif /*_TD_OS_TIME_H_*/
/*
* 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_*/
...@@ -22,9 +22,6 @@ ...@@ -22,9 +22,6 @@
#include "rpcHead.h" #include "rpcHead.h"
#include "rpcTcp.h" #include "rpcTcp.h"
#include <sys/epoll.h>
typedef struct SFdObj { typedef struct SFdObj {
void *signature; void *signature;
SOCKET fd; // TCP socket FD SOCKET fd; // TCP socket FD
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册