107 Commits

Author SHA1 Message Date
Joran Dirk Greef
92407bfcd7 Upgrade check_errno() to an exhaustive switch (safer) 2020-09-19 18:29:50 +02:00
Joran Dirk Greef
ba18420b27 Zero the SQE slot and assign, instead of initializing with default values 2020-09-19 18:17:06 +02:00
Joran Dirk Greef
f4df2f091a Allow the kernel to drive feature detection 2020-09-19 17:31:39 +02:00
Joran Dirk Greef
64ae9a6a87 Rename to error.SubmissionQueueFull 2020-09-19 16:54:44 +02:00
Joran Dirk Greef
c1f9d10b6a Remove unused import aliases 2020-09-19 16:51:35 +02:00
Joran Dirk Greef
9fabae2a28 Return error.UnsupportedKernel for ENOSYS 2020-09-19 16:47:05 +02:00
Joran Dirk Greef
cb591285d7 Use linux.IORING_SQ_CQ_OVERFLOW 2020-09-19 16:20:21 +02:00
Joran Dirk Greef
31533eb743 Move to std/os/linux 2020-09-19 16:18:04 +02:00
Matt Knight
88dacd3b70
changed to opaque 2020-09-13 09:53:20 -07:00
Matt Knight
1afbf4fb21
removed all those kern aliases 2020-09-13 09:43:49 -07:00
Matt Knight
cb5f76bb1c
got booleans wrong 2020-09-13 09:24:56 -07:00
Matt Knight
b043a31889
added helper definitions 2020-09-12 23:45:35 -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
Andrew Kelley
f6f0e09456
Merge pull request #6267 from mattnite/btf
BPF: add BTF
2020-09-08 12:59:31 -04:00
Matt Knight
a496f94be9 added map create, update, delete, and prog load 2020-09-07 15:42:41 -04:00
Matthew Knight
db7a238297
BPF: add some more documentation (#6268)
* added documentation for ringbuffers, which context type maps to which program type, and added some formatting
2020-09-07 15:41:29 -04:00
Matt Knight
b878a64a5f
added license comments 2020-09-07 12:26:41 -07:00
Matt Knight
cf3194804e
changed enums to lower case 2020-09-07 07:17:21 -07:00
Matt Knight
e7547eeefa
fixed missing 'packed' keyword 2020-09-06 22:31:35 -07:00
Matt Knight
caaa9ad2af
added btf 2020-09-06 21:44:16 -07:00
Matt Knight
67817b230f
fixed improper builtin import 2020-09-06 17:09:25 -07:00
Matt Knight
cf06817768
improved compile error message 2020-09-06 16:21:05 -07:00
Matt Knight
a993c7dd1b
removed redundant pseudo insn 2020-09-06 16:19:49 -07:00
Matt Knight
295f09eadc
implemented and testing op codes for instructions documented in the unofficial bpf insn reference 2020-09-06 16:12:27 -07: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
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
Shawn Anastasio
ec0d775524 Implement std.os for powerpc64{,le} 2020-07-01 16:10:49 -05:00
Tadeo Kondrak
6745a6f6f6
zig fmt 2020-05-05 09:38:02 -06:00
Timon Kruiper
c829f2f7b7 Add mips support to standard library 2020-04-24 15:28:55 -04:00
daurnimator
63409cf422 std: linux syscall numbers are now an extensible enum 2020-03-31 10:16:20 -04:00
Andrew Kelley
9e7ae06249
std lib API deprecations for the upcoming 0.6.0 release
See #3811
2020-03-30 14:23:22 -04:00
LemonBoy
d788b0cd8b std: Minor changes to TLS handling
* Always allocate an info block per-thread so that libc can store
  important stuff there.
* Respect ABI-mandated alignment in more places.
* Nicer code, use slices/pointers instead of raw addresses whenever
  possible.
2020-03-28 11:20:38 -04:00
Andrew Kelley
f7f563ea53
Revert "Merge pull request #4807 from LemonBoy/tls-touchups"
This reverts commit ee6fda2297bf75432b8d7115ec4c60c213535bbe, reversing
changes made to f313ab18aecea1ade0b6a90d671352a641ad351a.

This caused a test failure:

```
behavior.misc.test "behavior-arm-linux-none-Debug-bare-multi thread local variable"...test failure
/home/vsts/work/1/s/lib/std/testing.zig:191:14: 0x4608f in std.testing.expect (test)
    if (!ok) @panic("test failure");
             ^
/home/vsts/work/1/s/test/stage1/behavior/misc.zig:616:11: 0x53e93 in behavior.misc.test "behavior-arm-linux-none-Debug-bare-multi thread local variable" (test)
    expect(S.t == 1235);
          ^
```
2020-03-25 21:12:24 -04:00
LemonBoy
a34f67aa66 std: Minor changes to TLS handling
* Always allocate an info block per-thread so that libc can store
  important stuff there.
* Respect ABI-mandated alignment in more places.
* Nicer code, use slices/pointers instead of raw addresses whenever
  possible.
2020-03-25 12:08:50 +01:00
Alexandros Naskos
7559418305 Added comment justifying wrapping operations 2020-03-03 12:41:11 +02:00
Alexandros Naskos
a48cd1cf58 Allow wrapping in VDSO lookup 2020-03-02 11:44:21 +02:00
Andrew Kelley
3c76e5e33d
update tls in std lib for lack of sub-arch 2020-02-19 22:09:35 -05:00
LemonBoy
a779450fef linux/i386: Make syscall6 more robust and correct
LLVM10 exposed a subtle flaw in the previous implementation that made
the mmap tests fail.
2020-02-07 22:13:05 +01:00
Andrew Kelley
a867b43366
progress towards merging
see BRANCH_TODO file
2020-01-19 20:54:04 -05:00
LemonBoy
c5cfc9bf68 Move definition of __aeabi_read_tp 2020-01-15 17:50:51 +01:00
Andrew Kelley
53913acaf7
zig fmt and update extern fn to callconv(.C) 2020-01-06 15:34:50 -05:00
LemonBoy
563d9ebfe5 Implement the callconv() annotation 2020-01-02 18:53:16 +01:00
LemonBoy
333eec557f Initial support for static PIE executables 2019-12-21 17:34:05 +01:00
LemonBoy
19ddbd9e9e Make sure the address is aligned for intToPtr ops
Closes #773
2019-12-15 14:41:05 -05:00
Andrew Kelley
951dc451d6
Merge pull request #3808 from LemonBoy/i386-for-ya
linux-i386 support
2019-11-30 22:00:00 -05:00
Andrew Kelley
413f9a5cfc
move std.fs.Dir.cwd to std.fs.cwd
update to non-deprecated std.fs APIs throughout the codebase

Related: #3811
2019-11-30 15:35:27 -05:00
LemonBoy
e1e06e6766 linux-i386 support 2019-11-30 16:13:33 +01:00
Andrew Kelley
15d415e10b
make std.mem.toSlice use null terminated pointers
and fix the fallout
2019-11-24 21:21:05 -05:00
Andrew Kelley
47f06be369
string literals are now null terminated
this also deletes C string literals from the language, and then makes
the std lib changes and compiler changes necessary to get the behavior
tests and std lib tests passing again.
2019-11-21 20:43:41 -05:00
Andrew Kelley
aa0daea541
update more of the std lib to use @as 2019-11-08 15:57:25 -05:00