diff --git a/BUILD.bazel b/BUILD.bazel index b7b61a596..e547f9785 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -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": [], }) diff --git a/NOTICE b/NOTICE index a238511b4..2b4633981 100644 --- a/NOTICE +++ b/NOTICE @@ -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 -------------------------------------- diff --git a/bazel/config/BUILD.bazel b/bazel/config/BUILD.bazel index 3710ad469..cadec106e 100644 --- a/bazel/config/BUILD.bazel +++ b/bazel/config/BUILD.bazel @@ -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 = [ @@ -48,6 +56,7 @@ selects.config_setting_group( ":linux_ppc64le", ":darwin_x86_64", ":darwin_aarch64", + ":windows_x86_64", ], visibility = ["//visibility:public"], ) diff --git a/benchmarks/ReadFileUtil.hpp b/benchmarks/ReadFileUtil.hpp index bf8f00b7e..e0cb4adf6 100644 --- a/benchmarks/ReadFileUtil.hpp +++ b/benchmarks/ReadFileUtil.hpp @@ -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; }