update build.sh and thirdparty include

pull/160/head
taoxiangdong 4 years ago
parent ff99761582
commit 09fed7e998

@ -89,14 +89,18 @@ if (ENABLE_OPEN_SRC)
find_module(error_manager_static liberror_manager.a ${ASCEND_ACL_DIR})
find_module(msprofiler libmsprofiler.a ${ASCEND_ACL_DIR})
find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR})
if(NOT PRODUCT STREQUAL "flr3")
if(PRODUCT STREQUAL "flr3")
find_module(msprof libmsprof.so ${ASCEND_DRIVER_SHARE_DIR})
elseif(PRODUCT STREQUAL "flr1")
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver)
find_module(msprof libmsprof.so ${ASCEND_DRIVER_COMMON_DIR})
elseif(PRODUCT STREQUAL "flr2")
# flr2 ascend_hal_stub limsprof ?
else()
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR})
find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR})
else()
find_module(msprof libmsprof.so ${ASCEND_DRIVER_SHARE_DIR})
endif()
elseif(PLATFORM STREQUAL "all")
#mdc dcdriver
find_module(msprof libmsprof.so ${ASCEND_DRIVER_COMMON_DIR})
find_module(hccl libhccl.so ${ASCEND_RUNTIME_DIR})
find_module(adump_server libadump_server.a ${ASCEND_ACL_DIR})
@ -106,7 +110,6 @@ if (ENABLE_OPEN_SRC)
find_module(error_manager liberror_manager.so ${ASCEND_ATC_DIR})
find_module(error_manager_static liberror_manager.a ${ASCEND_ACL_DIR})
find_module(msprofiler libmsprofiler.a ${ASCEND_ACL_DIR})
#mdc dcdriver/lib64/driver
find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver)
find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR})
else()

@ -95,6 +95,9 @@ checkopts()
}
checkopts "$@"
git submodule update --init metadef
git submodule update --init parser
mk_dir() {
local create_dir="$1" # the target to make
@ -134,7 +137,7 @@ build_graphengine()
echo "execute command: cmake ${CMAKE_ARGS} .. failed."
return 1
fi
COMMON_TARGET="ge_common engine fmk_parser parser_common _caffe_parser fmk_onnx_parser graph register "
COMMON_TARGET="ge_common engine fmk_parser parser_common _caffe_parser fmk_onnx_parser graph register engine_conf.json optimizer_priority.pbtxt "
TARGET=${COMMON_TARGET}
if [ "x${PLATFORM}" = "xtrain" ]
then
@ -211,14 +214,80 @@ generate_package()
cd "${BASEPATH}"
GRAPHENGINE_LIB_PATH="lib"
ACL_PATH="acllib/lib64"
FWK_PATH="fwkacllib/lib64"
ATC_PATH="atc/lib64"
ATC_BIN_PATH="atc/bin"
NNENGINE_PATH="plugin/nnengine/ge_config"
OPSKERNEL_PATH="plugin/opskernel"
ATC_LIB=("libc_sec.so" "libge_common.so" "libge_compiler.so" "libgraph.so" "libregister.so")
FWK_LIB=("libge_common.so" "libge_runner.so" "libgraph.so" "libregister.so")
PLUGIN_OPSKERNEL=("libge_local_engine.so" "libge_local_opskernel_builder.so" "libhost_cpu_engine.so" "libhost_cpu_opskernel_builder.so" "optimizer_priority.pbtxt")
PARSER_LIB=("lib_caffe_parser.so" "libfmk_onnx_parser.so" "libfmk_parser.so" "libparser_common.so")
rm -rf ${OUTPUT_PATH:?}/${FWK_PATH}/
rm -rf ${OUTPUT_PATH:?}/${ACL_PATH}/
rm -rf ${OUTPUT_PATH:?}/${ATC_PATH}/
rm -rf ${OUTPUT_PATH:?}/${ATC_BIN_PATH}/
mk_dir "${OUTPUT_PATH}/${FWK_PATH}/${NNENGINE_PATH}"
mk_dir "${OUTPUT_PATH}/${FWK_PATH}/${OPSKERNEL_PATH}"
mk_dir "${OUTPUT_PATH}/${ATC_PATH}/${NNENGINE_PATH}"
mk_dir "${OUTPUT_PATH}/${ATC_PATH}/${OPSKERNEL_PATH}"
mk_dir "${OUTPUT_PATH}/${ACL_PATH}"
mk_dir "${OUTPUT_PATH}/${ATC_BIN_PATH}"
cd "${OUTPUT_PATH}"
find ./ -name graphengine_lib.tar -exec rm {} \;
find ./bin -name atc -exec cp {} "${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH}" \;
cp ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH}/engine_conf.json ${OUTPUT_PATH}/${FWK_PATH}/${NNENGINE_PATH}
cp ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH}/engine_conf.json ${OUTPUT_PATH}/${ATC_PATH}/${NNENGINE_PATH}
find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name libengine.so -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH}/${NNENGINE_PATH}/../ \;
find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name libengine.so -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH}/${NNENGINE_PATH}/../ \;
MAX_DEPTH=1
if [ "x${PLATFORM}" = "xall" ] || [ "x${PLATFORM}" = "xinference" ]
then
MAX_DEPTH=2
fi
for lib in "${PLUGIN_OPSKERNEL[@]}";
do
find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth ${MAX_DEPTH} -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH}/${OPSKERNEL_PATH} \;
find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth ${MAX_DEPTH} -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH}/${OPSKERNEL_PATH} \;
done
for lib in "${PARSER_LIB[@]}";
do
find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH} \;
find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${ACL_PATH} \;
done
for lib in "${FWK_LIB[@]}";
do
find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH} \;
done
for lib in "${ATC_LIB[@]}";
do
find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH} \;
done
find ./bin -name atc -exec cp {} "${OUTPUT_PATH}/${ATC_BIN_PATH}" \;
find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "libregister.a" -exec cp -f {} ${OUTPUT_PATH}/${ACL_PATH} \;
tar -cf graphengine_lib.tar "${GRAPHENGINE_LIB_PATH}"
if [ "x${PLATFORM}" = "xtrain" ]
then
tar -cf graphengine_lib.tar fwkacllib
elif [ "x${PLATFORM}" = "xinference" ]
then
tar -cf graphengine_lib.tar acllib atc
elif [ "x${PLATFORM}" = "xall" ]
then
tar -cf graphengine_lib.tar fwkacllib acllib atc
fi
}
if [[ "X$ENABLE_GE_UT" = "Xoff" ]]; then

@ -1 +1 @@
Subproject commit 5d06bc7547189f24195b3cedcb0bfc3d787c80a5
Subproject commit d4d3655d2257c8e3e78b338aa02af47bdcfda21b

@ -1 +1 @@
Subproject commit 5af5c72fba1315f3d52113a5e88dc618d68e7dbc
Subproject commit 702254b9d482d38ef8eaa9ca894327286b4da118

@ -17,10 +17,10 @@
#ifndef _MMPA_API_H_
#define _MMPA_API_H_
#define LINUX 0
#define WIN 1
#define LINUX 0
#define WIN 1
#if(OS_TYPE == LINUX)
#if(OS_TYPE == LINUX) //lint !e553
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@ -75,6 +75,7 @@
#include <sys/wait.h>
#include <sys/statvfs.h>
#include <sys/prctl.h>
#include <sys/inotify.h>
#include "securec.h"
@ -84,7 +85,7 @@
#endif
#if(OS_TYPE == WIN)
#if(OS_TYPE == WIN) //lint !e553
#include <winsock2.h>
#include <winsock.h>
#include "Windows.h"
@ -103,16 +104,19 @@
#include <stdarg.h>
#include "shlwapi.h"
#include <direct.h>
#include "sub_inc/mmpa_typedef_win.h"
#include "sub_inc/mmpa_win.h"
#include <VersionHelpers.h>
#include <processthreadsapi.h>
#include <Wbemidl.h>
#include <iphlpapi.h>
#include <synchapi.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "securec.h"
#include "sub_inc/mmpa_typedef_win.h"
#include "sub_inc/mmpa_win.h"
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "mswsock.lib")
#pragma comment(lib, "Kernel32.lib")

@ -30,18 +30,26 @@ typedef pthread_t mmThread;
typedef pthread_mutex_t mmMutex_t;
typedef pthread_cond_t mmCond;
typedef pthread_mutex_t mmMutexFC;
typedef pthread_rwlock_t mmRWLock_t;
typedef signed int mmProcess;
typedef int mmPollHandle;
typedef int mmPipeHandle;
typedef int mmFileHandle;
typedef int mmComPletionKey;
typedef int mmCompletionHandle;
typedef int mmErrorMsg;
typedef int mmFd_t;
typedef VOID *mmExitCode;
typedef key_t mmKey_t;
typedef int mmMsgid;
typedef struct dirent mmDirent;
typedef struct shmid_ds mmshmId_ds;
typedef int (*mmFilter)(const mmDirent *entry);
typedef int (*mmSort)(const mmDirent **a, const mmDirent **b);
typedef size_t mmSize_t;
typedef off_t mmOfft_t;
typedef pid_t mmPid_t;
typedef VOID *(*userProcFunc)(VOID *pulArg);
@ -50,6 +58,16 @@ typedef struct {
VOID *pulArg; // Callback function parameters
} mmUserBlock_t;
typedef struct {
const char *dli_fname;
void *dli_fbase;
const char *dli_sname;
void *dli_saddr;
size_t dli_size; /* ELF only */
int dli_bind; /* ELF only */
int dli_type;
} mmDlInfo;
typedef struct {
int wSecond; // Seconds. [0-60] (1 leap second)
int wMinute; // Minutes. [0-59]
@ -73,6 +91,7 @@ typedef pthread_key_t mmThreadKey;
typedef int mmOverLap;
typedef ssize_t mmSsize_t;
typedef size_t mmSize; // size
typedef struct {
UINT32 createFlag;
@ -201,6 +220,17 @@ typedef struct {
#define M_RDWR O_RDWR
#define M_CREAT O_CREAT
#define M_BINARY O_RDONLY
#define M_TRUNC O_TRUNC
#define M_IRWXU S_IRWXU
#define M_IN_CREATE IN_CREATE
#define M_IN_CLOSE_WRITE IN_CLOSE_WRITE
#define M_IN_IGNORED IN_IGNORED
#define M_OUT_CREATE IN_CREATE
#define M_OUT_CLOSE_WRITE IN_CLOSE_WRITE
#define M_OUT_IGNORED IN_IGNORED
#define M_OUT_ISDIR IN_ISDIR
#define M_IREAD S_IREAD
#define M_IRUSR S_IRUSR
@ -236,13 +266,20 @@ typedef struct {
#define MMPA_OPTIONAL_ARGUMENT 2
#define MMPA_MAX_PATH PATH_MAX
#define M_NAME_MAX MAX_FNAME
#define M_F_OK F_OK
#define M_R_OK R_OK
#define M_W_OK W_OK
#define MMPA_STDIN STDIN_FILENO
#define MMPA_STDOUT STDOUT_FILENO
#define MMPA_STDERR STDERR_FILENO
#define MMPA_RTLD_NOW RTLD_NOW
#define MMPA_RTLD_GLOBAL RTLD_GLOBAL
#define MMPA_RTLD_LAZY RTLD_LAZY
#define MMPA_RTLD_NODELETE RTLD_NODELETE
#define MMPA_DL_EXT_NAME ".so"
@ -250,6 +287,7 @@ extern INT32 mmCreateTask(mmThread *threadHandle, mmUserBlock_t *funcBlock);
extern INT32 mmJoinTask(mmThread *threadHandle);
extern INT32 mmMutexInit(mmMutex_t *mutex);
extern INT32 mmMutexLock(mmMutex_t *mutex);
extern INT32 mmMutexTryLock(mmMutex_t *mutex);
extern INT32 mmMutexUnLock(mmMutex_t *mutex);
extern INT32 mmMutexDestroy(mmMutex_t *mutex);
extern INT32 mmCondInit(mmCond *cond);
@ -257,6 +295,14 @@ extern INT32 mmCondLockInit(mmMutexFC *mutex);
extern INT32 mmCondLock(mmMutexFC *mutex);
extern INT32 mmCondUnLock(mmMutexFC *mutex);
extern INT32 mmCondLockDestroy(mmMutexFC *mutex);
extern INT32 mmRWLockInit(mmRWLock_t *rwLock);
extern INT32 mmRWLockRDLock(mmRWLock_t *rwLock);
extern INT32 mmRWLockTryRDLock(mmRWLock_t *rwLock);
extern INT32 mmRWLockWRLock(mmRWLock_t *rwLock);
extern INT32 mmRWLockTryWRLock(mmRWLock_t *rwLock);
extern INT32 mmRDLockUnLock(mmRWLock_t *rwLock);
extern INT32 mmWRLockUnLock(mmRWLock_t *rwLock);
extern INT32 mmRWLockDestroy(mmRWLock_t *rwLock);
extern INT32 mmCondWait(mmCond *cond, mmMutexFC *mutex);
extern INT32 mmCondTimedWait(mmCond *cond, mmMutexFC *mutex, UINT32 milliSecond);
extern INT32 mmCondNotify(mmCond *cond);
@ -266,6 +312,7 @@ extern INT32 mmGetPid();
extern INT32 mmGetTid();
extern INT32 mmGetPidHandle(mmProcess *processHandle);
extern INT32 mmGetLocalTime(mmSystemTime_t *sysTime);
extern INT32 mmGetSystemTime(mmSystemTime_t *sysTime);
extern INT32 mmSemInit(mmSem_t *sem, UINT32 value);
extern INT32 mmSemWait(mmSem_t *sem);
@ -273,7 +320,9 @@ extern INT32 mmSemPost(mmSem_t *sem);
extern INT32 mmSemDestroy(mmSem_t *sem);
extern INT32 mmOpen(const CHAR *pathName, INT32 flags);
extern INT32 mmOpen2(const CHAR *pathName, INT32 flags, MODE mode);
extern FILE *mmPopen(CHAR *command, CHAR *type);
extern INT32 mmClose(INT32 fd);
extern INT32 mmPclose(FILE *stream);
extern mmSsize_t mmWrite(INT32 fd, VOID *buf, UINT32 bufLen);
extern mmSsize_t mmRead(INT32 fd, VOID *buf, UINT32 bufLen);
extern mmSockHandle mmSocket(INT32 sockFamily, INT32 type, INT32 protocol);
@ -284,9 +333,22 @@ extern INT32 mmConnect(mmSockHandle sockFd, mmSockAddr *addr, mmSocklen_t addrLe
extern INT32 mmCloseSocket(mmSockHandle sockFd);
extern mmSsize_t mmSocketSend(mmSockHandle sockFd, VOID *sendBuf, INT32 sendLen, INT32 sendFlag);
extern mmSsize_t mmSocketRecv(mmSockHandle sockFd, VOID *recvBuf, INT32 recvLen, INT32 recvFlag);
extern INT32 mmSocketSendTo(mmSockHandle sockFd,
VOID *sendMsg,
INT32 sendLen,
UINT32 sendFlag,
const mmSockAddr* addr,
INT32 tolen);
extern mmSsize_t mmSocketRecvFrom(mmSockHandle sockFd,
VOID *recvBuf,
mmSize recvLen,
UINT32 recvFlag,
mmSockAddr* addr,
mmSocklen_t *FromLen);
extern INT32 mmSAStartup();
extern INT32 mmSACleanup();
extern VOID *mmDlopen(const CHAR *fileName, INT32 mode);
extern INT32 mmDladdr(VOID *addr, mmDlInfo *info);
extern VOID *mmDlsym(VOID *handle, CHAR *funcName);
extern INT32 mmDlclose(VOID *handle);
extern CHAR *mmDlerror();
@ -294,6 +356,7 @@ extern INT32 mmCreateAndSetTimer(mmTimer *timerHandle, mmUserBlock_t *timerBlock
extern INT32 mmDeleteTimer(mmTimer timerHandle);
extern INT32 mmStatGet(const CHAR *path, mmStat_t *buffer);
extern INT32 mmStat64Get(const CHAR *path, mmStat64_t *buffer);
extern INT32 mmFStatGet(INT32 fd, mmStat_t *buffer);
extern INT32 mmMkdir(const CHAR *pathName, mmMode_t mode);
extern INT32 mmSleep(UINT32 milliSecond);
@ -337,6 +400,7 @@ extern VOID mmCloseCompletionPort(mmCompletionHandle handle);
extern INT32 mmPoll(mmPollfd *fds, INT32 fdCount, INT32 timeout, mmCompletionHandle handleIOCP, pmmPollData polledData,
mmPollBack pollBack);
extern INT32 mmGetErrorCode();
extern CHAR *mmGetErrorFormatMessage(mmErrorMsg errnum, CHAR *buf, mmSize size);
extern INT32 mmGetTimeOfDay(mmTimeval *timeVal, mmTimezone *timeZone);
extern mmTimespec mmGetTickCount();
extern INT32 mmGetRealPath(CHAR *path, CHAR *realPath);
@ -382,6 +446,7 @@ extern INT32 mmTlsDelete(mmThreadKey key);
extern INT32 mmGetOsType();
extern INT32 mmFsync(mmProcess fd);
extern INT32 mmFsync2(INT32 fd);
extern INT32 mmChdir(const CHAR *path);
extern INT32 mmUmask(INT32 pmode);
extern INT32 mmThreadKill(mmThread id);
@ -439,6 +504,10 @@ extern INT32 mmCreateProcess(const CHAR *fileName, const mmArgvEnv *env, const c
extern INT32 mmCreateTaskWithThreadAttr(mmThread *threadHandle, const mmUserBlock_t *funcBlock,
const mmThreadAttr *threadAttr);
extern mmFileHandle mmShmOpen(const CHAR *name, INT32 oflag, mmMode_t mode);
extern INT32 mmShmUnlink(const CHAR *name);
extern VOID *mmMmap(mmFd_t fd, mmSize_t size, mmOfft_t offset, mmFd_t *extra, INT32 prot, INT32 flags);
extern INT32 mmMunMap(VOID *data, mmSize_t size, mmFd_t *extra);
#define MMPA_DLL_API
#ifdef __cplusplus

@ -79,6 +79,8 @@ typedef long LONG;
#define MMPA_THREAD_SCHED_OTHER SCHED_OTHER
#define MMPA_THREAD_MIN_STACK_SIZE PTHREAD_STACK_MIN
#define MM_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
#define MMPA_MAX_NI 19
#define MMPA_MIN_NI (-20)
@ -86,6 +88,7 @@ typedef long LONG;
#define EN_ERR 1
#define EN_ERROR (-1)
#define EN_INVALID_PARAM (-2)
#define EN_TIMEOUT (-3)
#ifdef __cplusplus
#if __cplusplus

@ -1,4 +1,4 @@
/**
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -35,6 +35,7 @@ extern "C" {
#define EN_ERR 1
#define EN_ERROR (-1)
#define EN_INVALID_PARAM (-2)
#define EN_TIMEOUT (-3)
#define HANDLE_INVALID_VALUE (-1)
#define INVALID_SOCKET_HANDLE INVALID_SOCKET
@ -60,6 +61,7 @@ extern "C" {
#define MMPA_MIDDLE_NI 5
#define MMPA_LOW_NI (-5)
#define MMPA_MIN_NI (-20)
#define MMPA_MAX_FILE 128
#define MMPA_MAX_THREAD_PIO 99
#define MMPA_MIDDLE_THREAD_PIO 66
@ -71,6 +73,8 @@ extern "C" {
#define MMPA_THREAD_SCHED_OTHER 0
#define MMPA_THREAD_MIN_STACK_SIZE 0
#define MM_MUTEX_INITIALIZER NULL
#ifdef __cplusplus
#if __cplusplus
}

@ -1,4 +1,4 @@
/**
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -43,8 +43,9 @@ typedef HANDLE mmThread;
typedef HANDLE mmProcess;
typedef HANDLE mmPollHandle;
typedef HANDLE mmPipeHandle;
typedef HANDLE mmFileHandle;
typedef HANDLE mmCompletionHandle;
typedef HANDLE mmFd_t;
typedef CRITICAL_SECTION mmMutexFC;
typedef CONDITION_VARIABLE mmCond;
@ -59,15 +60,22 @@ typedef SYSTEMTIME mmSystemTime_t;
typedef HANDLE mmSem_t;
typedef SOCKET mmSockHandle;
typedef SRWLOCK mmRWLock_t;
typedef struct sockaddr mmSockAddr;
typedef int mmSocklen_t;
typedef int mmSemTimeout_t;
typedef long mmAtomicType;
typedef DWORD mmExitCode;
typedef DWORD mmErrorMsg;
typedef int mmKey_t;
typedef HANDLE mmMsgid;
typedef long int mmOfft_t;
typedef int mmPid_t;
typedef INT32 mmSsize_t;
typedef int mmSize; // size
typedef size_t mmSize_t;
typedef VOID mmshmId_ds;
typedef enum {
DT_DIR = FILE_ATTRIBUTE_DIRECTORY,
@ -181,6 +189,16 @@ typedef struct {
ULONGLONG availSize;
} mmDiskSize;
typedef struct {
const char *dli_fname;
void *dli_fbase;
const char *dli_sname;
void *dli_saddr;
size_t dli_size; /* ELF only */
int dli_bind; /* ELF only */
int dli_type;
} mmDlInfo;
typedef struct {
char addr[MMPA_MACINFO_DEFAULT_SIZE]; // ex:aa-bb-cc-dd-ee-ff\0
} mmMacInfo;
@ -223,8 +241,10 @@ typedef VOID (*mmPf)(VOID);
#define M_RDONLY _O_RDONLY
#define M_WRONLY _O_WRONLY
#define M_RDWR _O_RDWR
#define M_IRWXU _O_RDWR
#define M_CREAT _O_CREAT
#define M_BINARY _O_BINARY
#define M_TRUNC _O_TRUNC
#define M_IREAD _S_IREAD
#define M_IRUSR _S_IREAD
@ -232,6 +252,15 @@ typedef VOID (*mmPf)(VOID);
#define M_IWUSR _S_IWRITE
#define M_IXUSR 0
#define M_IN_CREATE FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME
#define M_IN_CLOSE_WRITE FILE_NOTIFY_CHANGE_LAST_WRITE
#define M_IN_IGNORED FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME
#define M_OUT_CREATE 0x00000100
#define M_OUT_CLOSE_WRITE 0x00000008
#define M_OUT_IGNORED 0x00008000
#define M_OUT_ISDIR 0x40000000
#define M_MSG_CREAT 1
#define M_MSG_EXCL 2
#define M_MSG_NOWAIT 3
@ -251,6 +280,16 @@ typedef VOID (*mmPf)(VOID);
#define M_UMASK_GRPEXEC 0
#define M_UMASK_OTHEXEC 0
#define DT_UNKNOWN 0
#define DT_FIFO 1
#define DT_CHR 2
#define DT_DIR 4
#define DT_BLK 6
#define DT_REG 8
#define DT_LNK 10
#define DT_SOCK 12
#define DT_WHT 14
#define mmConstructor(x) __declspec(allocate(".CRT$XCU")) mmPf con = x
#define mmDestructor(x) __declspec(allocate(".CRT$XPU")) mmPf de = x
@ -269,13 +308,20 @@ typedef VOID (*mmPf)(VOID);
#define MMPA_EMSG ""
#define MMPA_MAX_PATH MAX_PATH
#define M_NAME_MAX _MAX_FNAME
#define M_F_OK 0
#define M_W_OK 2
#define M_R_OK 4
#define MMPA_STDIN stdin
#define MMPA_STDOUT stdout
#define MMPA_STDERR stderr
#define MMPA_RTLD_NOW 0
#define MMPA_RTLD_GLOBAL 0
#define MMPA_RTLD_LAZY 0
#define MMPA_RTLD_NODELETE 0
#define MMPA_DL_EXT_NAME ".dll"
@ -285,6 +331,7 @@ _declspec(dllexport) INT32 mmCreateTask(mmThread *threadHandle, mmUserBlock_t *f
_declspec(dllexport) INT32 mmJoinTask(mmThread *threadHandle);
_declspec(dllexport) INT32 mmMutexInit(mmMutex_t *mutex);
_declspec(dllexport) INT32 mmMutexLock(mmMutex_t *mutex);
_declspec(dllexport) INT32 mmMutexTryLock(mmMutex_t *mutex);
_declspec(dllexport) INT32 mmMutexUnLock(mmMutex_t *mutex);
_declspec(dllexport) INT32 mmMutexDestroy(mmMutex_t *mutex);
_declspec(dllexport) INT32 mmCondInit(mmCond *cond);
@ -292,6 +339,14 @@ _declspec(dllexport) INT32 mmCondLockInit(mmMutexFC *mutex);
_declspec(dllexport) INT32 mmCondLock(mmMutexFC *mutex);
_declspec(dllexport) INT32 mmCondUnLock(mmMutexFC *mutex);
_declspec(dllexport) INT32 mmCondLockDestroy(mmMutexFC *mutex);
_declspec(dllexport) INT32 mmRWLockInit(mmRWLock_t *rwLock);
_declspec(dllexport) INT32 mmRWLockRDLock(mmRWLock_t *rwLock);
_declspec(dllexport) INT32 mmRWLockTryRDLock(mmRWLock_t *rwLock);
_declspec(dllexport) INT32 mmRWLockWRLock(mmRWLock_t *rwLock);
_declspec(dllexport) INT32 mmRWLockTryWRLock(mmRWLock_t *rwLock);
_declspec(dllexport) INT32 mmRDLockUnLock(mmRWLock_t *rwLock);
_declspec(dllexport) INT32 mmWRLockUnLock(mmRWLock_t *rwLock);
_declspec(dllexport) INT32 mmRWLockDestroy(mmRWLock_t *rwLock);
_declspec(dllexport) INT32 mmCondWait(mmCond *cond, mmMutexFC *mutex);
_declspec(dllexport) INT32 mmCondTimedWait(mmCond *cond, mmMutexFC *mutex, UINT32 milliSecond);
@ -302,13 +357,16 @@ _declspec(dllexport) INT32 mmGetPid(VOID);
_declspec(dllexport) INT32 mmGetTid(VOID);
_declspec(dllexport) INT32 mmGetPidHandle(mmProcess *processHandle);
_declspec(dllexport) INT32 mmGetLocalTime(mmSystemTime_t *sysTime);
_declspec(dllexport) INT32 mmGetSystemTime(mmSystemTime_t *sysTime);
_declspec(dllexport) INT32 mmSemInit(mmSem_t *sem, UINT32 value);
_declspec(dllexport) INT32 mmSemWait(mmSem_t *sem);
_declspec(dllexport) INT32 mmSemPost(mmSem_t *sem);
_declspec(dllexport) INT32 mmSemDestroy(mmSem_t *sem);
_declspec(dllexport) INT32 mmOpen(const CHAR *pathName, INT32 flags);
_declspec(dllexport) INT32 mmOpen2(const CHAR *pathName, INT32 flags, MODE mode);
_declspec(dllexport) FILE *mmPopen(CHAR *command, CHAR *type);
_declspec(dllexport) INT32 mmClose(INT32 fd);
_declspec(dllexport) INT32 mmPclose(FILE *stream);
_declspec(dllexport) mmSsize_t mmWrite(INT32 fd, VOID *buf, UINT32 bufLen);
_declspec(dllexport) mmSsize_t mmRead(INT32 fd, VOID *buf, UINT32 bufLen);
_declspec(dllexport) mmSockHandle mmSocket(INT32 sockFamily, INT32 type, INT32 protocol);
@ -319,9 +377,22 @@ _declspec(dllexport) INT32 mmConnect(mmSockHandle sockFd, mmSockAddr *addr, mmSo
_declspec(dllexport) INT32 mmCloseSocket(mmSockHandle sockFd);
_declspec(dllexport) mmSsize_t mmSocketRecv(mmSockHandle sockFd, VOID *recvBuf, INT32 recvLen, INT32 recvFlag);
_declspec(dllexport) mmSsize_t mmSocketSend(mmSockHandle sockFd, VOID *sendBuf, INT32 sendLen, INT32 sendFlag);
_declspec(dllexport) INT32 mmSocketSendTo(mmSockHandle sockFd,
VOID *sendMsg,
INT32 sendLen,
UINT32 sendFlag,
const mmSockAddr* addr,
INT32 tolen);
_declspec(dllexport) mmSsize_t mmSocketRecvFrom(mmSockHandle sockFd,
VOID *recvBuf,
mmSize recvLen,
UINT32 recvFlag,
mmSockAddr* addr,
mmSocklen_t *FromLen);
_declspec(dllexport) INT32 mmSAStartup(VOID);
_declspec(dllexport) INT32 mmSACleanup(VOID);
_declspec(dllexport) VOID *mmDlopen(const CHAR *fileName, INT mode);
_declspec(dllexport) INT32 mmDladdr(VOID *addr, mmDlInfo *info);
_declspec(dllexport) VOID *mmDlsym(VOID *handle, CHAR *fileName);
_declspec(dllexport) INT32 mmDlclose(VOID *handle);
_declspec(dllexport) CHAR *mmDlerror(VOID);
@ -330,6 +401,7 @@ _declspec(dllexport) INT32
_declspec(dllexport) INT32 mmDeleteTimer(mmTimer timerHandle);
_declspec(dllexport) INT32 mmStatGet(const CHAR *path, mmStat_t *buffer);
_declspec(dllexport) INT32 mmStat64Get(const CHAR *path, mmStat64_t *buffer);
_declspec(dllexport) INT32 mmFStatGet(INT32 fd, mmStat_t *buffer);
_declspec(dllexport) INT32 mmMkdir(const CHAR *pathName, mmMode_t mode);
_declspec(dllexport) INT32 mmSleep(UINT32 milliSecond);
_declspec(dllexport) INT32 mmCreateTaskWithAttr(mmThread *threadHandle, mmUserBlock_t *funcBlock);
@ -371,6 +443,7 @@ _declspec(dllexport) INT32 mmPoll(mmPollfd *fds, INT32 fdCount, INT32 timeout, m
pmmPollData polledData, mmPollBack pollBack);
_declspec(dllexport) INT32 mmGetErrorCode();
_declspec(dllexport) CHAR *mmGetErrorFormatMessage(mmErrorMsg errnum, CHAR *buf, mmSize size);
_declspec(dllexport) INT32 mmGetTimeOfDay(mmTimeval *timeVal, mmTimezone *timeZone);
_declspec(dllexport) mmTimespec mmGetTickCount();
_declspec(dllexport) INT32 mmGetRealPath(CHAR *path, CHAR *realPath);
@ -407,7 +480,7 @@ _declspec(dllexport) INT32 mmTlsDelete(mmThreadKey key);
_declspec(dllexport) INT32 mmGetOsType();
_declspec(dllexport) INT32 mmFsync(mmProcess fd);
_declspec(dllexport) INT32 mmFsync2(INT32 fd);
_declspec(dllexport) INT32 mmChdir(const CHAR *path);
_declspec(dllexport) INT32 mmUmask(INT32 pmode);
_declspec(dllexport) INT32 mmWaitPid(mmProcess pid, INT32 *status, INT32 options);
@ -455,7 +528,10 @@ _declspec(dllexport) INT32
_declspec(dllexport) INT32
mmCreateTaskWithThreadAttr(mmThread *threadHandle, const mmUserBlock_t *funcBlock, const mmThreadAttr *threadAttr);
_declspec(dllexport) mmFileHandle mmShmOpen(const CHAR *name, INT32 oflag, mmMode_t mode);
_declspec(dllexport) INT32 mmShmUnlink(const CHAR *name);
_declspec(dllexport) VOID *mmMmap(mmFd_t fd, mmSize_t size, mmOfft_t offset, mmFd_t *extra, INT32 prot, INT32 flags);
_declspec(dllexport) INT32 mmMunMap(VOID *data, mmSize_t size, mmFd_t *extra);
#ifdef __cplusplus
#if __cplusplus
}

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save