Andrew Kelley
e86cee258c
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
...
In particular I wanted the change that makes `suspend;` illegal in the
parser.
2021-04-24 10:44:41 -07:00
Matt Knight
8530b6b724
fix import path
2021-04-24 13:35:55 -04:00
Andrew Kelley
93d1c2d6d4
std: fix compile errors caught by stage2 AstGen
...
Follow-up from 507a8096d2f9624bafaf963c3e189a477ef6b7bf
2021-04-22 19:32:57 -07:00
Andrew Kelley
8dd7378013
delete packed enums from the language
...
No need for any such thing. Instead, provide an integer tag type for the
enum.
2021-04-22 19:21:50 -07:00
Andrew Kelley
507a8096d2
std: fix compile errors caught by stage2 AstGen
...
* `comptime const` is redundant
* don't use `extern enum`; specify a tag type.
`extern enum` is only when you need tags to alias. But aliasing tags
is a smell. I will be making a proposal shortly to remove `extern enum`
from the language.
* there is no such thing as `packed enum`.
* instead of `catch |_|`, omit the capture entirely.
* unused function definition with missing parameter name
* using `try` outside of a function or test
2021-04-22 18:07:46 -07:00
LemonBoy
e4f9a3041a
std: Use stat definition with 32bit *time fields
...
We're not ready for Y38K yet.
2021-04-21 16:31:30 +02:00
LemonBoy
d82eb8dd40
std: Split syscall parameters for PowerPC targets
2021-04-21 16:31:29 +02:00
Hubert Jasudowicz
d605f02756
std: Add process_vm_readv/writev wrappers
2021-04-19 16:12:28 +02:00
Hubert Jasudowicz
5134fb72ef
std: Add pidfd wrappers
2021-04-17 01:13:16 +02:00
Manuel Floruß
2cd49d20e8
Fix std.os.windows.user32.messageBoxW
...
Arguments to `selectSymbol` were passed in the wrong order.
2021-04-16 13:01:25 -04:00
Mahdi Khanalizadeh
d1a41feddc
linux: fix number of arguments for tgkill syscall
2021-04-16 17:09:15 +02:00
Andrew Kelley
429cd2b5dd
std: change @import("builtin") to std.builtin
2021-04-15 19:06:39 -07:00
Andrew Kelley
04b8354702
freebsd: disable failing test
...
See #8538
2021-04-15 00:59:40 -07:00
Andrew Kelley
c5e662d860
Merge pull request #8497 from LemonBoy/some-ppc-fixes
...
Improve Improve PowerPC support
2021-04-11 18:59:31 -07:00
LemonBoy
9bebdc77d6
std: Fix TLS definitions for 32bit PowerPC targets
...
Correct some silly errors and add the missing piece to set the thread
pointer (r2).
2021-04-11 21:26:22 +02:00
Benjamin Feng
2e85eb2bf8
Rename time32 syscalls to match rest of stdlib
2021-04-10 22:47:22 -05:00
Benjamin Feng
df910b33f4
Add ppc Linux bits
2021-04-10 22:47:22 -05:00
Michael Dusan
341dc03b63
netbsd: minor fixes to allow stage1 to build
2021-04-07 16:26:21 -07:00
Michael Dusan
2871d32be7
test: fix std.time timing tests to skip on failure
2021-04-07 08:33:32 -04:00
Vincent Rischmann
5ce4524027
os/bits/linux: add IPv6 socket options
2021-04-04 20:43:41 +03:00
Michael Dusan
cc435dab2f
test: fix io_uring timing test to skip on failure
2021-04-02 07:12:09 -04:00
Sreehari S
5c28b8cd11
boot_services: implement locateDevicePath
2021-03-25 16:45:43 +02:00
Carlos Zúñiga
187af14599
Fixed typo in user32
...
Use CreateWindowExW instead of RegisterClassExW as the type of pfnCreateWindowExW.
2021-03-22 10:43:04 +02:00
LemonBoy
867ae506e3
std: Add syscall7 stub for Linux/MIPS
...
Some syscalls such as fadvise require an extra argument to comply with
the register pair alignment imposed by the ABI.
Wacky, isn't it?
2021-03-19 13:03:55 -07:00
LemonBoy
27d07c6c4d
std: Replace testing fns for floating-point values
...
Beside handling NaNs and other non-numeric values better we finally
offer the same pair of testing predicates in math and testing.
2021-03-14 17:23:47 -04:00
Isaac Freund
b83ef595a5
std/linux: sync io_uring library with liburing
...
liburing commit: 1bafb3ce5f
As stated in the liburing commit message, this fixes a regression,
reverting code that was added specutively to avoid a syscall in some
cases.
2021-03-12 22:22:06 +01:00
Vincent Rischmann
3dd8396a55
os/linux: fix IO_Uring.timeout
...
According to the io_uring PDF (https://kernel.dk/io_uring.pdf ) the
timeout struct must be 64 bits on both 32 and 64 bit architectures.
2021-03-02 14:13:11 +02:00
Andrew Kelley
a20169a610
zig fmt the std lib
2021-03-01 20:04:28 -07:00
Andrew Kelley
9550db33cb
Merge pull request #8097 from LemonBoy/thread-spawn-order
...
std: Swap arguments in Thread.spawn
2021-02-28 20:42:34 -08:00
daurnimator
1f17221bc4
std: add sendmsg
2021-02-28 21:57:43 +02:00
LemonBoy
566adc2510
std: Swap arguments in Thread.spawn
...
Beside the new order being consistent with the ThreadPool API and making
more sense, this shuffling allows to write the context argument type in
terms of the startFn arguments, reducing the use of anytype (eg. less
explicit casts when using comptime_int parameters, yay).
Sorry for the breakage.
Closes #8082
2021-02-28 14:03:19 +01:00
Al Hoang
c17396691c
initial support for haiku sync update
...
* add cpu count
* use haiku find_directory
* add definitions and exports for building in haiku
2021-02-25 16:41:42 -07:00
Al Hoang
6b0372229d
initial support for haiku continue clean up
...
* remove unused definitions
* setup os specific blocks
2021-02-25 16:41:42 -07:00
Al Hoang
025635c3f8
initial support for haiku past stage0
2021-02-25 16:41:42 -07:00
Andrew Kelley
5f35dc0c0d
zig fmt the std lib
2021-02-24 21:29:23 -07:00
Asherah Connor
4272f07f66
std.os.uefi.Guid fixes ( #8032 )
...
* uefi: Guid.format compiles again
Also use "writer" nomenclature in argument name.
* uefi: add Guid.eql
2021-02-21 12:17:59 +02:00
Tau
840331ee48
Rebase link(at) properly
2021-02-21 12:04:40 +02:00
data-man
340825a7af
Add epoll_pwait2 Linux syscall
2021-02-21 11:47:13 +02:00
Tadeo Kondrak
5dfe0e7e8f
Convert inline fn to callconv(.Inline) everywhere
2021-02-10 20:06:12 -07:00
Andrew Kelley
4ca1f4ec2e
Merge pull request #7846 from LemonBoy/filtertest
...
stage1: don't filter test blocks with empty label
2021-01-25 10:39:11 -08:00
Joran Dirk Greef
68a040aec7
linux: add fallocate() to io_uring
2021-01-25 10:34:20 -08:00
Timon Kruiper
9238d12537
windows: make sure to handle PATH_NOT_FOUND when deleting files
...
Fixes #7879
2021-01-25 10:33:08 -08:00
Timon Kruiper
4f7d76f19c
fix windows bug in Progress.zig
...
This bug caused the compiler to deadlock when multiple c objects
were build in parallel.
Thanks @kprotty for finding this bug!
2021-01-24 12:20:51 -07:00
LemonBoy
134f5fd3d6
std: Update test "" to test where it makes sense
2021-01-22 15:46:58 +01:00
Andrew Kelley
a9667b5a85
organize std lib concurrency primitives and add RwLock
...
* 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-14 20:41:37 -07:00
Asherah Connor
2b0e3ee228
std.os.uefi.protocols.FileProtocol: fix and expose get_position, set_position ( #7762 )
2021-01-13 21:46:22 -05:00
Bill Nagel
1e2be14b6b
define nfds_t for windows
2021-01-12 16:37:58 -08:00
Rohlem
c96272f618
std.os.windows.GetFinalPathNameByHandle: remove intermediate buffers
...
... and mem.copy operations. Requires slightly larger input buffers than result length. Add helper functions std.mem.alignInBytes and std.mem.alignInSlice.
2021-01-11 17:48:19 -07:00
Rohlem
f301a8467c
std.os.windows.GetFinalPathNameByHandle: remove QueryInformationFile code path
2021-01-11 17:48:18 -07:00
Rohlem
cb20503990
std.os.windows.GetFinalPathNameByHandle: address non-structural review comments
2021-01-11 17:48:18 -07:00