This commit is contained in:
Shengliang Guan 2020-09-28 04:20:40 +00:00
parent 6a1825905b
commit ca028a3d17
2 changed files with 4 additions and 34 deletions

View File

@ -9,3 +9,7 @@ SET_SOURCE_FILES_PROPERTIES(osCoredump.c PROPERTIES COMPILE_FLAGS -w)
ADD_LIBRARY(osdetail ${SRC})
TARGET_LINK_LIBRARIES(osdetail os)
IF (TD_ARM_64)
TARGET_LINK_LIBRARIES(osdetail atomic)
ENDIF ()

View File

@ -1,34 +0,0 @@
/*
* 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"
#ifdef _TD_ARM_32_
int8_t atomic_store_8(void *ptr, int8_t val) {}
return __atomic_store_n((ptr), (val), __ATOMIC_SEQ_CST)
}
int8_t atomic_fetch_sub_8(void *ptr, int8_t val) {}
return __atomic_fetch_sub((ptr), (val), __ATOMIC_SEQ_CST)
}
int8_t atomic_fetch_add_8(void *ptr, int8_t val) {}
return __atomic_fetch_add((ptr), (val), __ATOMIC_SEQ_CST)
}
#endif