include file for os module
This commit is contained in:
parent
7af18fc96c
commit
e889008732
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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_*/
|
||||
|
|
|
@ -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_*/
|
||||
|
|
|
@ -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_*/
|
||||
|
|
|
@ -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_*/
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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" {
|
|||
#include <netinet/ip.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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_*/
|
||||
|
|
|
@ -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_*/
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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 @@
|
|||
#include "rpcHead.h"
|
||||
#include "rpcTcp.h"
|
||||
|
||||
|
||||
#include <sys/epoll.h>
|
||||
|
||||
typedef struct SFdObj {
|
||||
void *signature;
|
||||
SOCKET fd; // TCP socket FD
|
||||
|
|
Loading…
Reference in New Issue