feat/support_fiber #2
@ -27,7 +27,9 @@ endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") set(CMAKE_C_FLAGS
|
||||
# "${CMAKE_CXX_FLAGS} -static")
|
||||
# "${CMAKE_CXX_FLAGS} -static") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
|
||||
# -fsanitize=address ") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address
|
||||
# ")
|
||||
|
||||
set(WHOLE_ARCHIVE_PREFIX "-Wl,-force_load")
|
||||
# set(NO_WHOLE_ARCHIVE_PREFIX "")
|
||||
|
@ -50,7 +50,8 @@
|
||||
// x1: to
|
||||
.text
|
||||
.global TILE_ASM_SYMBOL(tile_ucontext_swap)
|
||||
.balign 16
|
||||
// .balign 16
|
||||
.align 8
|
||||
TILE_ASM_SYMBOL(tile_ucontext_swap):
|
||||
|
||||
// Save context 'from'
|
||||
|
@ -44,7 +44,8 @@ std::unique_ptr<Fiber> Fiber::Create(std::function<void()> proc) noexcept {
|
||||
Fiber::Fiber(std::function<void()> proc)
|
||||
: ctx_(object_pool::Get<FiberContext>().Leak()), proc_(std::move(proc)) {
|
||||
|
||||
memset(&ctx_->uctx, 0, sizeof(tile_ucontext_t));
|
||||
// memset(&ctx_->uctx, 0, sizeof(tile_ucontext_t));
|
||||
// memset(&ctx_->stack, 0, kStackSize);
|
||||
if (proc_) {
|
||||
tile_ucontext_set_target(&ctx_->uctx, &ctx_->stack, kStackSize, RunProc,
|
||||
&proc_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user