173 Commits

Author SHA1 Message Date
daurnimator
b42ffbe9e8
std: use PR enum as only location of opcode numbers 2020-11-04 22:39:35 +11:00
daurnimator
b90fb1e96b
std: add PR enum for the prctl opcode 2020-11-04 22:32:57 +11:00
Jakub Konka
5060497174
Merge pull request #6921 from xackus/gimmeMoreOfThoseSweetSweetFileDescriptors
stage2: ask for more file descriptors
2020-11-03 10:07:39 +01:00
Jakub Konka
8dda64fa3e
Fix Darwin codepath
On Darwin, according to the man pages for setrlimit(), when adjusting
max number of open fds, the reported hard max by getrlimit() is only
theoretical, while the actual maximum, set in the kernel, is hardcoded
in the header file. Therefore, the reported max has to be adjusted
as `min(OPEN_MAX, lim.max)`.

Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-11-03 00:38:43 +01:00
Andrew Kelley
909aae8153
Merge pull request #6792 from koachan/sparc64-linux
Initial sparc64-linux bringup
2020-11-01 22:14:56 -05:00
xackus
6418284680 std: add {set,get}rlimit bits and improve test 2020-11-01 15:47:46 -05:00
Joran Dirk Greef
ab1ed93ad9 Add close_range, faccessat2 and process_madvise 2020-10-30 12:39:01 +02:00
Joran Dirk Greef
9423ed1671 Add more mips syscall numbers
As per: lib/libc/musl/arch/mips/bits/syscall.h.in

...and as promised: https://github.com/ziglang/zig/pull/6356#issuecomment-696023349

Thanks @daurnimator again for the help with #6356.
2020-10-30 11:53:45 +02:00
Koakuma
891c6ddd5f Select stat struct type based on whether we are linking with libc 2020-10-30 11:46:33 +07:00
Andrew Kelley
a41c0b63bb
Merge pull request #6356 from jorangreef/io_uring
std: add io_uring library
2020-10-29 18:20:38 -04:00
Koakuma
5125eb77bd Use the *_stat type as self 2020-10-29 21:37:45 +07:00
LemonBoy
8044ed4c66 std: Add basic smoke test for net functionality 2020-10-27 21:52:47 +01:00
Frank Denis
74a1175d9d std/*: add missing MIT license headers 2020-10-26 17:41:29 +01:00
Sébastien Marie
2a0a11aa66 openbsd: make dl_phdr_info cross arches
introduce Addr and Half definition to std.elf, and use them for dl_phdr_info
2020-10-25 20:46:28 -04:00
Koakuma
cbc8750502 Separate libc stat and kernel stat definitions 2020-10-25 23:52:08 +07:00
Koakuma
1a362ea5b0 Fix sparc64 bits definitions 2020-10-25 21:38:39 +07:00
Koakuma
785153d756 Fix SA_* constants for sparc64 2020-10-25 20:39:32 +07:00
Koakuma
cdbf66e36e Add sparc64-specific values for the various SA_ and SIG_ constants 2020-10-24 20:05:34 +07:00
Koakuma
268516d5d9 Fix constants 2020-10-24 20:04:18 +07:00
Koakuma
c29da84c0e Add sp loading 2020-10-24 20:01:29 +07:00
Koakuma
23433fb317 Fix register naming 2020-10-24 19:59:05 +07:00
Koakuma
de06b0a635 Add sparc64 linux bits 2020-10-24 19:59:04 +07:00
Andrew Kelley
569f7ce49e Merge branch 'improve-windows-networking'
of https://github.com/BarabasGitHub/zig into
BarabasGitHub-improve-windows-networking

Conflicts:
 lib/std/os.zig

This commit resolves conflicts with the changes to std.os which removed
the EAGAIN error handling interactions with the event loop. The solution
to the conflict was to apply EAGAIN => return error.WouldBlock into the
improved windows networking branch.
2020-10-22 16:59:15 -07:00
LemonBoy
96fe971051 std: Minor changes to startup code
* Smaller startup sequence for ppc64
* Terminate the frame-pointer chain when executing _start
* Make the stack traces work on ppc64
* Make the stack traces coloured on ppc64, some ioctls numbers are
  different and the whole set of constants should be audited.
2020-10-19 15:15:43 +02:00
Andrew Kelley
05b1a7414e code cleanups
* in selfExePath, return errors instead of defaulting to bogus data
 * less invasive edits to the logic of link/Elf.zig
 * less indentation
2020-10-17 17:52:09 -07:00
Andrew Kelley
03f7cffce9 Merge branch 'openbsd-minimal' of https://github.com/semarie/zig into semarie-openbsd-minimal 2020-10-17 17:34:43 -07:00
Sebastien Marie
35a7247a2c
Merge branch 'master' into openbsd-minimal 2020-10-17 17:38:23 +02:00
Jan Prudil
aadccc4206 Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
Sébastien Marie
f33a610c84 add minimal openbsd support 2020-10-11 08:23:36 +00:00
Benjamin Feng
9de0f15b8e Rename ix_rss -> ixrss 2020-10-08 15:31:36 -05:00
Benjamin Feng
fd3f676cdb Pull in Darwin definitions for rusage 2020-10-08 15:19:52 -05:00
xackus
4ec26be424 implement {get, set}rlimit for linux 2020-10-04 23:56:10 +02:00
Joran Dirk Greef
c5b4fcaa1c Add IORING_FEAT_POLL_32BITS 2020-10-03 17:43:08 +02:00
Joran Dirk Greef
5f99d2c240 Define SPLICE, PROVIDE_BUFFERS, REMOVE_BUFFERS and TEE opcodes and flags 2020-09-21 20:15:14 +02:00
Joran Dirk Greef
843c104fc9 Add io_uring syscalls to os.bits.linux.mips.SYS
As per lib/libc/musl/arch/mips/bits/syscall.h.in:

```c
```
2020-09-21 10:39:58 +02:00
Joran Dirk Greef
a853f00410 Add IORING_FEAT_FAST_POLL 2020-09-20 19:51:23 +02:00
Joran Dirk Greef
4bc1b7a7ac Fix io_uring_sqe to use the names of the first member of each union
Now we're really future-proof... no more `opflags` creeping in.

When anonymous unions land, we can start using `accept_flags` etc.

Until then, code using this struct won't break when the kernel adds features.

Refs: https://github.com/ziglang/zig/issues/6349
Refs: https://github.com/ziglang/zig/issues/985
2020-09-19 18:50:24 +02:00
Joran Dirk Greef
e7ae6f2fad Remove default values from io_uring_sqe struct 2020-09-19 18:14:41 +02:00
Joran Dirk Greef
873d1c80b3 Add splice_fd_in to io_uring_sqe and future-proof for anonymous unions 2020-09-19 16:15:17 +02:00
Joran Dirk Greef
d966fe6319 Add IORING_SQ_CQ_OVERFLOW to std/os/bits/linux.zig 2020-09-17 19:53:34 +02:00
Isaac Freund
b6f4601545
std: add securebits definitions for linux 2020-09-11 22:32:23 +02:00
Isaac Freund
7b961a876b
std: add prctl definition for linux 2020-09-11 22:32:22 +02:00
Andrew Kelley
800c5de2ae update the stack trace test case for lines added to start.zig 2020-09-10 14:40:33 -07:00
Andrew Kelley
2315331d23
Merge pull request #5527 from shawnanastasio/ppc64le
Implement support for powerpc64{,le}
2020-09-10 15:56:27 -04:00
Bas van den Berg
127fa80090 implement poll for windows with WSAPoll (only available on vista and higher) 2020-09-10 20:20:27 +02:00
Jens Goldberg
5bf3e54018 Add the Linux TCP socket options 2020-09-08 13:00:07 -04:00
Bas
4a6ca735d9
Merge branch 'master' into improve-windows-networking 2020-09-08 11:56:59 +02:00
Veikka Tuominen
41bbadbb9a
Merge pull request #6246 from Vexu/field
Remove deprecated fields on `type`
2020-09-05 13:58:02 +03:00
Vexu
1df0f3ac24
update uses of deprecated type field access 2020-09-03 18:10:40 +03:00
Isaac Freund
e8a2aecd2f
std: fix linux uid_t, use uid_t/gid_t in std.os
- correct uid_t from i32 to u32 on linux
- define uid_t and gid_t for OSes missing definitions
- use uid_t/gid_t instead of plain u32s throughout std.os
2020-09-03 15:08:37 +02:00