diff options
author | 2023-04-27 03:35:46 -0700 | |
---|---|---|
committer | 2023-04-27 03:35:46 -0700 | |
commit | 4558ea712a40c25306868577eea0211c838daf55 (patch) | |
tree | 9a06e449f688e6a0f252b92a9a1e4cfa993e0a94 /src/io/io_darwin.zig | |
parent | f1c1f556a3e962454bae481cc54ca9acf194d141 (diff) | |
download | bun-4558ea712a40c25306868577eea0211c838daf55.tar.gz bun-4558ea712a40c25306868577eea0211c838daf55.tar.zst bun-4558ea712a40c25306868577eea0211c838daf55.zip |
very slightly faster open() and writeFileSync() (#2759)
* Make open() slightly faster on macOS
* Support using `writeFileSync` from native code
* Add `openat$NOCANCEL` symbol
* fixups for linux
* do benchmark
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/io/io_darwin.zig')
-rw-r--r-- | src/io/io_darwin.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/io/io_darwin.zig b/src/io/io_darwin.zig index c631b5744..902ae2ae4 100644 --- a/src/io/io_darwin.zig +++ b/src/io/io_darwin.zig @@ -271,6 +271,7 @@ pub const darwin = struct { pub extern "c" fn @"accept$NOCANCEL"(sockfd: c.fd_t, noalias addr: ?*c.sockaddr, noalias addrlen: ?*c.socklen_t) c_int; pub extern "c" fn @"accept4$NOCANCEL"(sockfd: c.fd_t, noalias addr: ?*c.sockaddr, noalias addrlen: ?*c.socklen_t, flags: c_uint) c_int; pub extern "c" fn @"open$NOCANCEL"(path: [*:0]const u8, oflag: c_uint, ...) c_int; + pub extern "c" fn @"openat$NOCANCEL"(fd: c.fd_t, path: [*:0]const u8, oflag: c_uint, ...) c_int; pub extern "c" fn @"read$NOCANCEL"(fd: c.fd_t, buf: [*]u8, nbyte: usize) isize; pub extern "c" fn @"pread$NOCANCEL"(fd: c.fd_t, buf: [*]u8, nbyte: usize, offset: c.off_t) isize; pub extern "c" fn @"write$NOCANCEL"(fd: c.fd_t, buf: [*]const u8, nbyte: usize) isize; |