Compare commits

...

3 Commits

Author SHA1 Message Date
tqcq
f8195b2cdd fix tile init
All checks were successful
android / build (x86) (pull_request) Successful in 4m41s
android / build (x86_64) (pull_request) Successful in 4m46s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Successful in 15m41s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Successful in 15m34s
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (push) Successful in 15m37s
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (push) Successful in 16m2s
linux-x64-clang / linux-clang (Debug) (push) Successful in 10m36s
linux-x64-clang / linux-clang (Release) (push) Successful in 10m51s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (pull_request) Successful in 15m36s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (pull_request) Successful in 15m45s
linux-arm-gcc / linux-gcc-arm (Release) (pull_request) Successful in 13m42s
linux-arm-gcc / linux-gcc-arm (Debug) (pull_request) Successful in 15m44s
linux-arm-gcc / linux-gcc-armhf (Release) (pull_request) Successful in 13m51s
linux-arm-gcc / linux-gcc-armhf (Debug) (pull_request) Successful in 15m54s
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 13m55s
linux-x64-gcc / linux-gcc (Release) (push) Successful in 13m34s
linux-x86-gcc / linux-gcc (Debug) (push) Successful in 14m50s
linux-x86-gcc / linux-gcc (Release) (push) Successful in 15m34s
linux-mips-gcc / linux-gcc-mipsel (Debug) (pull_request) Successful in 14m43s
linux-mips-gcc / linux-gcc-mipsel (Release) (pull_request) Successful in 15m18s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (pull_request) Successful in 15m5s
linux-mips64-gcc / linux-gcc-mips64el (Release) (pull_request) Successful in 15m34s
linux-x64-clang / linux-clang (Debug) (pull_request) Successful in 10m1s
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (pull_request) Successful in 16m13s
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (pull_request) Successful in 14m52s
linux-x64-clang / linux-clang (Release) (pull_request) Successful in 11m57s
linux-x64-gcc / linux-gcc (Debug) (pull_request) Successful in 13m45s
linux-x64-gcc / linux-gcc (Release) (pull_request) Successful in 13m46s
linux-x86-gcc / linux-gcc (Debug) (pull_request) Successful in 15m3s
linux-x86-gcc / linux-gcc (Release) (pull_request) Successful in 15m15s
2025-03-06 16:48:16 +08:00
tqcq
b6be1a6397 update README.md
All checks were successful
android / build (arm64-v8a) (pull_request) Successful in 4m42s
android / build (armeabi-v7a) (pull_request) Successful in 5m13s
android / build (x86) (pull_request) Successful in 5m33s
android / build (x86_64) (pull_request) Successful in 5m45s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (pull_request) Successful in 15m51s
linux-arm-gcc / linux-gcc-arm (Release) (pull_request) Successful in 14m57s
linux-arm-gcc / linux-gcc-arm (Debug) (pull_request) Successful in 16m23s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (pull_request) Successful in 16m42s
linux-arm-gcc / linux-gcc-armhf (Debug) (pull_request) Successful in 15m17s
linux-arm-gcc / linux-gcc-armhf (Release) (pull_request) Successful in 14m47s
linux-mips-gcc / linux-gcc-mipsel (Release) (pull_request) Successful in 16m9s
linux-mips-gcc / linux-gcc-mipsel (Debug) (pull_request) Successful in 16m35s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (pull_request) Successful in 15m41s
linux-mips64-gcc / linux-gcc-mips64el (Release) (pull_request) Successful in 15m42s
linux-x64-gcc / linux-gcc (Debug) (pull_request) Successful in 11m42s
linux-x64-gcc / linux-gcc (Release) (pull_request) Successful in 11m56s
linux-x86-gcc / linux-gcc (Debug) (pull_request) Successful in 12m58s
linux-x86-gcc / linux-gcc (Release) (pull_request) Successful in 13m14s
linux-x64-clang / linux-clang (Debug) (pull_request) Successful in 7m59s
linux-x64-clang / linux-clang (Release) (pull_request) Successful in 8m56s
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (pull_request) Successful in 13m17s
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (pull_request) Successful in 14m18s
2025-03-02 20:17:07 +08:00
tqcq
6bae6cdc87 feat init task
Some checks failed
android / build (armeabi-v7a) (push) Successful in 20m0s
android / build (arm64-v8a) (push) Successful in 20m7s
android / build (x86) (push) Successful in 20m10s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (push) Failing after 31s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (push) Failing after 31s
linux-mips-gcc / linux-gcc-mipsel (Debug) (push) Failing after 31s
linux-mips-gcc / linux-gcc-mipsel (Release) (push) Failing after 32s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 31s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 32s
android / build (x86_64) (push) Failing after 13m16s
linux-x64-clang / linux-clang (Release) (push) Successful in 8m20s
linux-x64-clang / linux-clang (Debug) (push) Successful in 8m48s
linux-arm-gcc / linux-gcc-arm (Release) (push) Successful in 12m37s
linux-arm-gcc / linux-gcc-arm (Debug) (push) Successful in 14m19s
linux-arm-gcc / linux-gcc-armhf (Release) (push) Successful in 12m48s
linux-arm-gcc / linux-gcc-armhf (Debug) (push) Successful in 16m17s
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 12m9s
linux-x86-gcc / linux-gcc (Debug) (push) Successful in 13m22s
linux-x86-gcc / linux-gcc (Release) (push) Successful in 13m51s
linux-x64-gcc / linux-gcc (Release) (push) Successful in 11m56s
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (push) Successful in 13m7s
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (push) Successful in 14m40s
2025-03-02 19:49:04 +08:00
4 changed files with 11 additions and 18 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ build/
compile_commands.json
.gdb_history
.cmake.conf
third_party/

View File

@ -223,26 +223,8 @@ if((CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64") OR (CMAKE_SYSTEM_PROCESSOR MATCHES
endif()
endif()
# set(LIB_NAMES tile)
#
# if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU) OR
# ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}"
# STREQUAL "GNU") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD") OR
# ("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") OR ("${CMAKE_SYSTEM_NAME}"
# STREQUAL "DragonFly") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")) # FIXME:
# It should be "GNU ld # for elf" set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES}
# -Wl,--no-whole-archive) elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
# set(LIB_NAMES -Wl,-all_load ${LIB_NAMES}) endif()
add_library(tile::tile ALIAS tile)
# add_library(tile SHARED $<TARGET_OBJECTS:tile>) target_include_directories(
# tile PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/third_party/fmt/include"
# "${CMAKE_CURRENT_BINARY_DIR}/third_party/glog"
# "${CMAKE_CURRENT_SOURCE_DIR}/third_party/glog/src"
# "${CMAKE_CURRENT_SOURCE_DIR}" RPIVATE
# "${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include")
# target_link_libraries( tile PRIVATE ${WHOLE_ARCHIVE_PREFIX} gflags::gflags
# glog::glog libcurl fmt::fmt ${NO_WHOLE_ARCHIVE_PREFIX})
if(TILE_BUILD_TESTS)
enable_testing()

View File

@ -5,4 +5,7 @@
- [ ] 支持UDP
- [ ] 支持TCP
## 同步容器
- [ ] queue

View File

@ -32,6 +32,7 @@ namespace tile {
namespace {
std::atomic<bool> g_quit_siganl{false};
std::atomic<bool> g_tile_running{false};
void
QuitSignalHandler(int sig)
@ -58,6 +59,11 @@ InstallQuitSignalHandler()
int
Start(int argc, char **argv, std::function<int(int, char **)> cb, bool single_thread, bool enable_crash_catch)
{
{
bool expected = false;
TILE_CHECK(g_tile_running.compare_exchange_strong(expected, true), "tile already running.");
}
if (enable_crash_catch) {
// TODO: Add InstallFailureSignalHandler
// google::InstallFailureSignalHandler();
@ -139,6 +145,7 @@ void
Init(int argc, char **argv, std::function<int(int, char **)> cb)
{
std::unique_lock<std::mutex> _(init_lock);
TILE_CHECK(g_tile_running.load() == false, "tile already running.");
assert(lib_thread && "ReInitialize!!!");
const char *my_argv[1] = {"unknown"};