Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ uthread_srcs = [
"//bazel/config:linux_ppc64le": glob([uthread_prefix + "Linux/" + "ppc64le/*.S"]),
"//bazel/config:darwin_x86_64": glob([uthread_prefix + "Darwin/" + "x86_64/*.S"]),
"//bazel/config:darwin_aarch64": glob([uthread_prefix + "Darwin/" + "arm64/*.S"]),
"//bazel/config:windows_x86_64": glob([uthread_prefix + "Windows/" + "AMD64/*.asm"]),
"//conditions:default": [],
})

Expand Down
27 changes: 21 additions & 6 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,27 @@ async_simple/experimental/coroutine.h

Boost Software License, Version 1.0
--------------------------------------
async_simple/uthread/internal/jump_arm64_aapcs_elf_gas.S
async_simple/uthread/internal/jump_x86_64_sysv_elf_gas.S
async_simple/uthread/internal/make_arm64_aapcs_elf_gas.S
async_simple/uthread/internal/make_x86_64_sysv_elf_gas.S
async_simple/uthread/internal/ontop_arm64_aapcs_elf_gas.S
async_simple/uthread/internal/ontop_x86_64_sysv_elf_gas.S
async_simple/uthread/internal/Darwin/x86_64/jump_x86_64_sysv_macho_gas.S
async_simple/uthread/internal/Darwin/x86_64/ontop_x86_64_sysv_macho_gas.S
async_simple/uthread/internal/Darwin/x86_64/make_x86_64_sysv_macho_gas.S
async_simple/uthread/internal/Darwin/arm64/ontop_arm64_aapcs_macho_gas.S
async_simple/uthread/internal/Darwin/arm64/make_arm64_aapcs_macho_gas.S
async_simple/uthread/internal/Darwin/arm64/jump_arm64_aapcs_macho_gas.S
async_simple/uthread/internal/Linux/ppc64le/jump_ppc64_sysv_elf_gas.S
async_simple/uthread/internal/Linux/ppc64le/make_ppc64_sysv_elf_gas.S
async_simple/uthread/internal/Linux/ppc64le/ontop_ppc64_sysv_elf_gas.S
async_simple/uthread/internal/Linux/x86_64/make_x86_64_sysv_elf_gas.S
async_simple/uthread/internal/Linux/x86_64/jump_x86_64_sysv_elf_gas.S
async_simple/uthread/internal/Linux/x86_64/ontop_x86_64_sysv_elf_gas.S
async_simple/uthread/internal/Linux/aarch64/jump_arm64_aapcs_elf_gas.S
async_simple/uthread/internal/Linux/aarch64/ontop_arm64_aapcs_elf_gas.S
async_simple/uthread/internal/Linux/aarch64/make_arm64_aapcs_elf_gas.S
async_simple/uthread/internal/Linux/riscv64/jump_riscv64_sysv_elf_gas.S
async_simple/uthread/internal/Linux/riscv64/make_riscv64_sysv_elf_gas.S
async_simple/uthread/internal/Linux/riscv64/ontop_riscv64_sysv_elf_gas.S
async_simple/uthread/internal/Windows/AMD64/ontop_x86_64_ms_pe_masm.asm
async_simple/uthread/internal/Windows/AMD64/make_x86_64_ms_pe_masm.asm
async_simple/uthread/internal/Windows/AMD64/jump_x86_64_ms_pe_masm.asm

MIT LICENSE
--------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions bazel/config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ config_setting(
],
)

config_setting(
name = "windows_x86_64",
constraint_values = [
"@platforms//os:windows",
"@platforms//cpu:x86_64",
],
)

selects.config_setting_group(
name = "async_simple_with_uthread",
match_any = [
Expand All @@ -48,6 +56,7 @@ selects.config_setting_group(
":linux_ppc64le",
":darwin_x86_64",
":darwin_aarch64",
":windows_x86_64",
],
visibility = ["//visibility:public"],
)
Expand Down
6 changes: 6 additions & 0 deletions benchmarks/ReadFileUtil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,16 @@ std::size_t Uthread_read_some(FileDescriptor fd, Buffer buffer,
inline std::size_t Uthread_read_file(const char *filename, SimpleExecutor *e) {
auto buffer_size = fs::file_size(filename);
char *buffer = new char[buffer_size];
#ifdef _WIN32
int fd = -1;
#else
auto fd = open(filename, O_RDONLY);
#endif
auto sz = Uthread_read_some(fd, buffer, buffer_size, 0, e);
delete[] buffer;
#ifndef _WIN32
close(fd);
#endif
return sz;
}

Expand Down
Loading