84 Commits

Author SHA1 Message Date
Joran Dirk Greef
2fdb30a571 Add definitions for FALLOC_FL_ mode flags 2020-11-01 11:47:09 +02: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
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
Jan Prudil
aadccc4206 Make std.meta.Int accept a signedness parameter 2020-10-17 14:09:59 +02:00
Benjamin Feng
9de0f15b8e Rename ix_rss -> ixrss 2020-10-08 15:31:36 -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
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
2315331d23
Merge pull request #5527 from shawnanastasio/ppc64le
Implement support for powerpc64{,le}
2020-09-10 15:56:27 -04:00
Jens Goldberg
5bf3e54018 Add the Linux TCP socket options 2020-09-08 13:00:07 -04: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
Matthew Knight
0fa3cfdb4a
Bpf: move under os/linux instead of bits (#6126)
* moved bpf syscall, added some bpf instructions and tests

* had to move bpf out of bits so that a freestanding target could import it

* removed line

* fixed imports
2020-08-22 15:08:01 -04:00
Matt Knight
80fabe1850 fixed bpf namespace 2020-08-21 11:40:35 -07:00
heidezomp
1ca49b92c6 add UTIME_NOW and UTIME_OMIT constants for use in utimensat/futimens
copied from lib/libc/include/generic-musl/sys/stat.h
2020-08-20 17:02:58 -04:00
Andrew Kelley
4a69b11e74 add license header to all std lib files
add SPDX license identifier
copyright ownership is zig contributors
2020-08-20 16:07:04 -04:00
Matthew Knight
d605af511a
added bpf() syscall and some supporting structs (#6061)
* added bpf syscall and some supporting structs

* moved bpf to bits and added flags
2020-08-17 22:17:04 -04:00
luna
a6626802f9
Add signalfd support (#5322)
* add signalfd_siginfo to linux bits

* Cast sigaddset's shift value to u5

* linux: add signalfd4

* os: add signalfd
2020-07-22 17:26:27 -04:00
Shawn Anastasio
ec0d775524 Implement std.os for powerpc64{,le} 2020-07-01 16:10:49 -05:00
Andrew Kelley
7fd937fef4 cleanups
* improve docs
 * add TODO comments for things that don't have open issues
 * remove redundant namespacing of struct fields
 * guard against ioctl returning EINTR
 * remove the general std.os.ioctl function in favor of the specific
   ioctl_SIOCGIFINDEX function. This allows us to have a more precise
   error set, and more type-safe API.
2020-06-02 15:28:46 -04:00
Luna
aebf28eba3 Make ifru fields sentinel-terminated 2020-06-02 14:56:06 -04:00
Luna
c60daa255f Replace C types in declarations 2020-06-02 14:56:06 -04:00
Luna
10ea2db5cb Replace C shorts by integer types 2020-06-02 14:56:06 -04:00
Luna
cb649b769c Fix ifreq definition 2020-06-02 14:56:06 -04:00
Luna
2c641c93da Only resolve scope id when needed 2020-06-02 14:56:06 -04:00
Luna
9c200035f3 Add some interface structs to linux bits 2020-06-02 14:56:06 -04:00
Vincent Rischmann
636d3ba780
linux: fix IOSQE_BIT decl and io_uring_sqe flags 2020-05-30 16:05:46 +02:00
Vincent Rischmann
e5ffb94911 linux: remove duplicated fields 2020-05-17 02:42:59 -04:00
Tadeo Kondrak
6745a6f6f6
zig fmt 2020-05-05 09:38:02 -06:00
Tadeo Kondrak
350b2adacd
std.meta.IntType -> std.meta.Int 2020-04-28 19:11:31 -06:00
Timon Kruiper
c829f2f7b7 Add mips support to standard library 2020-04-24 15:28:55 -04:00
Vexu
b6fe839248
update std lib to decls being disallowed between fields 2020-04-18 23:56:05 +03:00
LemonBoy
5047cd3d78 Workaround for #4789 2020-04-01 12:46:16 +02:00
LemonBoy
070ace4b22 std: Fix more NetBSD bits
Fix some more libc definitions.
2020-04-01 12:11:19 +02:00
daurnimator
356ef3840f std: update for linux 5.6 release 2020-03-30 10:55:18 -04:00
LemonBoy
4843c3b4c3
std: Introduce fnctl wrapper 2020-03-18 13:45:52 -04:00
LemonBoy
3e93dce0a1 std: Fix detection of Linux kernel version 2020-03-10 12:55:35 -04:00
daurnimator
648f94c027 std: add some definitions for netlink sockets 2020-03-09 13:02:38 -04:00
Vexu
538d9a5dd8
remove uses of @ArgType and @IntType 2020-02-24 23:39:03 +02:00
LemonBoy
9d41ff335c std: Make TCSA enum ABI-compliant 2020-02-05 20:37:00 +01:00
nofmal
a697de3eac Add basic linux termios implementation 2020-02-04 14:09:57 -05:00
daurnimator
ab46713fa6 std: update for linux 5.5 release 2020-01-31 10:18:17 -05:00