Commit Graph

498 Commits

Author SHA1 Message Date
David Carlier 9691cded95 std: mcontext layout for x86 and fixing few x86_64 fields types for
FreeBSD
2023-04-23 19:46:18 +03:00
David CARLIER 1d322fe510 std: add accept_filter struct to make use of SO_ACCEPTFILTER socket option 2023-04-23 19:45:59 +03:00
David CARLIER 7b0e015eb4 std: add a subset of the macOs's libproc api. 2023-04-23 19:45:46 +03:00
David CARLIER 9140249d29 std: enriching malloc api on freebsd. 2023-04-23 19:45:34 +03:00
David CARLIER c579a23c5d std: add CCRandomGenerateBytes macOs native api. 2023-04-22 21:01:12 +01:00
David CARLIER 3f259d3550 std: adding netbsd's pthread to cpu affinity api 2023-04-22 13:59:00 +03:00
David CARLIER dbdafb6cc5 os: expand sched_getaffinity wrapper and update freebsd's cpuset api flags. 2023-04-22 13:54:57 +03:00
David CARLIER 83970b6d91 std: adding freebsd's elf_aux_info api 2023-04-21 11:42:49 -07:00
David CARLIER 2568da2f41 std: freebsd update proposal
adding getentropy and cpuset_(get/set)affinity calls.
2023-04-18 14:59:01 +03:00
David CARLIER 7b908e173f std: add shm_create_largepage for FreeBSD, completing MFD* constants. 2023-04-14 13:41:22 -04:00
David Carlier 56d800ff7e std add getrandom to solato solaris based systems 2023-04-14 08:11:13 +03:00
David CARLIER 4a0508e56c std: add kinfo_vmentry for FreeBSD 2023-04-13 23:46:03 -04:00
Andrew Kelley 60bd13bdf2 never use C pointers!!
you maniacs, you absolute monsters. degenerates. hooligans. criminals.

issue #2984 is coming for you.
2023-04-12 15:21:03 -07:00
David CARLIER 2e2d37917d std: add FreeBSD's procctl api. 2023-04-08 18:31:01 +03:00
jim price 3487514626 std.os: add mincore syscall
The mincore syscall is available on some UNIX like operating systems
and allows a user to determine if a page is resident in memory.
2023-04-06 00:57:23 -04:00
David CARLIER 3e467c778a std: add os_log/signpost api (sort of linux's perf event equivalent)
subset.
2023-04-06 07:31:06 +03:00
Nikita Ronja d92b5fcfb0 Add NetBSD termios constants to std.c.netbsd 2023-04-06 03:46:44 +03:00
David CARLIER 080136e4ad std: add madvise flags to freebsd 2023-04-05 13:54:01 +03:00
David CARLIER f86f531e9c std: add a subset of the apple's QOS api 2023-04-05 09:01:35 +02:00
David CARLIER 771d07268f std: freebsd MAP* constants update, MAP_ALIGNED_SUPER and the MAP_ALIGNED macro. 2023-04-04 12:57:16 +03:00
David CARLIER 1de64dba23 std: add the VM_MAKE_TAG macro for darwin. 2023-03-26 23:56:27 +02:00
Jakub Konka 6f15eedff1 darwin: put posix spawn constants in POSIX_SPAWN struct 2023-03-18 21:54:05 +01:00
Jakub Konka 37192bcdcb macos: HCS PoC working 2023-03-18 21:53:36 +01:00
Jakub Konka 266c81322e darwin: resurrect posix_spawn wrappers 2023-03-18 21:53:15 +01:00
Jakub Konka e1e414e62a std: move os/darwin.zig and related to c/darwin.zig
Move to c/darwin.zig as they really are libSystem/libc imports/wrappers.

As an added bonus, get rid of the nasty `usingnamespace`s which are now
unneeded.

Finally, add `os.ptrace` but currently only implemented on darwin.
2023-03-16 11:42:30 +01:00
Michael Dusan 599b3ef9e9 netbsd: use versioned __msync13 from libc
The system linker shows warning when `msync` is linked instead of `__msync13`:

  "warning: reference to compatibility msync(); include <sys/mman.h> for correct reference"

closes #14422
2023-01-28 19:05:38 -05:00
Stephen Gregoratto 7f635ae7bd FreeBSD: add mcontext_t for aarch64
What isn't disabled for test-std mostly passes, except for the copysign
and signbit tests for f16. Seemingly related to #14366.
2023-01-21 23:20:50 +02:00
mlugg d3599ec73c std: implement os.mprotect on Windows 2023-01-20 03:33:35 +02:00
Michael Dusan c9f7b32fbd netbsd: add mcontext_t for aarch64
- test `lib/std/std.zig` passes
- stack traces work
2023-01-18 02:50:11 -05:00
Andrew Kelley c9ef277fa7 Merge pull request #13980 from ziglang/std.net
networking: delete std.x; add std.crypto.tls and std.http.Client
2023-01-03 02:43:50 -05:00
Michael Dusan 571b817abc freebsd: add std.c.arc4random_buf 2023-01-02 19:18:33 -05:00
Michael Dusan 69553d60da dragonfly: add std.c.arc4random_buf
This allows for a more optimal std.crypto.tlcsprng codepath.

Without it a an "incorrect alignment" panic is triggered from
crypto.tlcsprng which aligns a threadlocal but it's actually
not aligned, thus detected by the safety check.

It appears that LLVM-IR does attribute the storage with alignment
but it is ultimately not respected in the final binary for netbsd
and dragonfly.
2023-01-02 19:18:33 -05:00
Michael Dusan e752606464 netbsd: getFdPath: F_GETPATH implementation 2023-01-02 19:18:33 -05:00
Michael Dusan 7da9348637 dragonfly: getFdPath: F_GETPATH implementation 2023-01-02 19:18:33 -05:00
Michael Dusan 537624734c freebsd: getFdPath: < 13.1 fallback impl 2023-01-02 19:18:32 -05:00
Michael Dusan e872c72c55 std.fs: add NAME_MAX for openbsd and netbsd 2023-01-02 19:18:32 -05:00
Andrew Kelley cd0d514643 remove the experimental std.x namespace
Playtime is over. I'm working on networking now.
2023-01-02 16:57:15 -07:00
Ganesan Rajagopal 06f70c030a Fix missing pthread_key_t definition on linux
* pthread_key_t should also be available for non-android platforms
* Also change the type to c_uint because Linux pthreadtypes.h typedefs it as "unsigned int"

Partially addresses #13950
2022-12-21 17:00:41 -05:00
Andrew Kelley 353121d9d5 std.c.fstatat64: add noalias attributes 2022-12-14 14:26:02 -07:00
Jakub Konka ec2697b7ea darwin: add even more wrappers for Mach syscalls
Rename `ThreadId` to `MachThread`.
2022-12-14 00:10:26 +01:00
Jakub Konka f505cb96f4 darwin: add thread_act_t wrapper and helpers 2022-12-13 12:53:10 +01:00
Jakub Konka 2efd0eb884 darwin: wrap task_threads mach syscall 2022-12-13 11:36:00 +01:00
Jakub Konka 6f5eb9927d darwin: add more defs and wrappers 2022-12-12 20:04:46 +01:00
Jakub Konka 612b9f4da1 darwin: add defs and funcs for Mach exception handling 2022-12-12 00:13:37 +01:00
Jakub Konka 402dfb5fd3 darwin: wrap mach_port_insert_right kernel call 2022-12-11 18:27:10 +01:00
Jakub Konka 2a65971eb0 darwin: wrap allocating and deallocating mach ports for a task 2022-12-11 14:40:27 +01:00
Andrew Kelley 50eb7983cd remove most conditional compilation based on stage1
There are still a few occurrences of "stage1" in the standard library
and self-hosted compiler source, however, these instances need a bit
more careful inspection to ensure no breakage.
2022-12-06 20:38:54 -07:00
Stevie Hryciw 04f3067a79 run zig fmt on everything checked by CI 2022-11-18 19:22:42 +00:00
Veikka Tuominen 41b7e40d75 Merge pull request #13418 from ryanschneider/signal-alignment-13216
std.os: fix alignment of Sigaction.handler_fn
2022-11-09 17:36:40 +02:00
Ali Chraghi aea617c60b std.os: take advantage of the freebsd's copy_file_range 2022-11-05 15:43:39 -04:00