aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c/freebsd.zig
AgeCommit message (Collapse)Author
2022-05-16std.os: Add memfd_create for FreeBSDIsaac Freund
This is minorly breaking as e.g. std.os.linux.MFD_CLOEXEC is now std.os.linux.MFD.CLOEXEC.
2022-04-19std.Thread.Futex improvements (#11464)protty
* atomic: cache_line * Thread: Futex rewrite + more native platform support * Futex: tests compile * Futex: compiles and runs test * Futex: broadcast test * Futex: fix PosixImpl for tests * Futex: fix compile errors for bsd platforms * Futex: review changes + fix timeout=0 + more comments
2022-02-15Adds Linux support for POSIX file locking with fcntlAnthony Carrico
On Linux, locking fails with EAGAIN (vs. EACCES on other systems). This commit also adds FcntlErrors for EDEADLK and ENOLCK.
2022-02-14Merge pull request #10486 from ominitay/metadataVeikka Tuominen
std: Implement cross-platform metadata API
2022-02-13std.c.*: add birthtime function to Statominitay
Adds a birthtime function to the `Stat` structs of Unices which support this. This is done to match the `atime`, `mtime`, and `ctime` functions.
2022-02-11validate in Windows using VirtualQuerym
2021-12-19stage1, stage2: rename c_void to anyopaque (#10316)Isaac Freund
zig fmt now replaces c_void with anyopaque to make updating code easy.
2021-09-16Set the Storage socket sizes to be system definedStephen Gregoratto
Some systems (Solaris, OpenBSD, AIX) change their definitions of sockaddr_storage to be larger than 128 bytes. This comment adds a new constant in the `sockaddr` that defines the size for every system. Fixes #9759
2021-09-01re-apply a commit dropped in this branch due to conflictsAndrew Kelley
This commit reapplies 4f0aa7d639e099b18df583cb984412037fbb1dbe.
2021-09-01std.os reorg: more fixes caught by CIAndrew Kelley
2021-09-01std.os fixes to get the test suite passing againAndrew Kelley
2021-09-01std: fix regressions from this branchAndrew Kelley
Also move some usingnamespace test cases from compare_output to behavior.
2021-09-01std: reorganization that allows new usingnamespace semanticsAndrew Kelley
The proposal #9629 is now accepted, usingnamespace stays but no longer puts identifiers in scope.
2021-09-01std.os.windows: reorg to avoid `usingnamespace`Andrew Kelley
Down to 19 uses of `usingnamespace`.
2021-09-01std.os: more reorganization effortsAndrew Kelley
* std lib tests are passing on x86_64-linux with and without -lc * stage2 is building from source on x86_64-linux * down to 38 remaining uses of `usingnamespace`
2021-09-01std: reorganize std.c to eliminate `usingnamespace`Andrew Kelley
Behavior tests pass on x86_64-linux with -lc
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-07-29std/c: add pthread_setname_np and pthread_getname_npVincent Rischmann
2021-04-22std: fix compile errors caught by stage2 AstGenAndrew Kelley
Follow-up from 507a8096d2f9624bafaf963c3e189a477ef6b7bf
2021-01-18std: define pipe2 only for os that support itLemonBoy
2021-01-14organize std lib concurrency primitives and add RwLockAndrew Kelley
* move concurrency primitives that always operate on kernel threads to the std.Thread namespace * remove std.SpinLock. Nobody should use this in a non-freestanding environment; the other primitives are always preferable. In freestanding, it will be necessary to put custom spin logic in there, so there are no use cases for a std lib version. * move some std lib files to the top level fields convention * add std.Thread.spinLoopHint * add std.Thread.Condition * add std.Thread.Semaphore * new implementation of std.Thread.Mutex for Windows and non-pthreads Linux * add std.Thread.RwLock Implementations provided by @kprotty
2021-01-01std.debug: adjust panic messageAndrew Kelley
also extern "c" instead of extern "pthread"
2021-01-01std: Show the panicking thread IDLemonBoy
Annotate the panic message with the thread ID to know who's the culprit.
2020-12-31Year++Frank Denis
2020-12-23std: add Darwin and FreeBSD sem_t bitsAndrew Kelley
2020-11-05Implement a fallback mechanism for posix_memalignLemonBoy
Do the alignment dance by ourselves whenever posix_memalign is not available. Don't try to use malloc as it has too many edge cases, figuring out whether a block of memory is manually aligned by the mechanism above or is directly coming from malloc becomes too hard to be valuable.
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-05-05zig fmtTadeo Kondrak
2020-03-05std: fix sendfile on macOS and FreeBSDMichael Dusan
- fix std.os.sendfile/FreeBSD use correct in/out fd_t - fix std.os.sendfile/macOS use correct in/out fd_t - undo 1141bfb21b82f8d3fc353e968a591f2ad9aaa571 (no longer needed) - fix c.freebsd.sendfile use off_t value - fix c.freebsd.sendfile decl correct in/out fd_t - fix c.darwin.sendfile decl correct in/out fd_t fix signature param names
2020-03-03fix macosx and freebsd build failuresAndrew Kelley
2020-03-03breaking: std.os read/write functions + sendfileAndrew Kelley
* rework os.sendfile and add macosx support, and a fallback implementation for any OS. * fix sendto compile error * std.os write functions support partial writes. closes #3443. * std.os pread / pwrite functions can now return `error.Unseekable`. * std.fs.File read/write functions now have readAll/writeAll variants which loop to complete operations even when partial reads/writes happen. * Audit std.os read/write functions with respect to Linux returning EINVAL for lengths greater than 0x7fff0000. * std.os read/write shim functions do not unnecessarily loop. Since partial reads/writes are part of the API, the caller will be forced to loop anyway, and so that would just be code bloat. * Improve doc comments * Add a non-trivial test for std.os.sendfile * Fix std.os.pread on 32 bit Linux * Add missing SYS_sendfile bit on aarch64
2020-03-02std: implement sendfile on linuxTerin Stock
This changset adds a `sendfile(2)` syscall bindings to the linux bits component. Where available, the `sendfile64(2)` syscall will be transparently called. A wrapping function has also been added to the std.os to transform errno returns to Zig errors. Change-Id: I86769fc4382c0771e3656e7b21137bafd99a4411
2020-01-18std: turn EAI_ constants into a non-exhaustive enumdaurnimator
2019-12-22freebsd: add missing OS and libc bitsJethro Nederhof
2019-11-08fixups and zig fmtAndrew Kelley
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221