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
Andrew Kelley
2b321c25ce
std.Progress: call refreshWithHeldLock as appropriate
2021-01-24 12:22:17 -07: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
LemonBoy
ac004e1bf1
stage1: Allow nameless test blocks
...
Nameless blocks are never filtered, the test prefix is still applied.
2021-01-22 15:46:58 +01:00
Jakub Konka
843d91e75d
Bring back stack trace printing on ARM Darwin
...
This temporary patch fixes a segfault caused by miscompilation
by the LLD when generating stubs for initialization of thread local
storage. We effectively bypass TLS in the default panic handler
so that no segfault is generated and the stack trace is correctly
reported back to the user.
Note that, this is linked directly to a bigger issue with LLD
ziglang/zig#7527 and when resolved, we only need to remove the
`comptime` code path introduced with this patch to use the default
panic handler that relies on TLS.
Co-authored-by: Andrew Kelley <andrew@ziglang.org>
2021-01-21 23:20:42 +01:00
Andrew Kelley
d5d0619aac
stage2: ELF: avoid multiplication for ideal capacity
...
ideal capacity is now determined by e.g.
x += x / f
rather than
x = x * b / a
This turns a multiplication into an addition, making it less likely to
overflow the integer. This commit also introduces padToIdeal() which
does saturating arithmetic so that no overflow is possible when
calculating ideal capacity.
closes #7830
2021-01-19 13:47:51 -07:00
Robin Voetter
02c138fe70
SPIR-V: Add glsl450 and vulkan spir-v operating system definitions
2021-01-19 15:28:17 +01:00
Robin Voetter
ab607d455e
SPIR-V: Initial architecture definitions and setup
2021-01-19 15:28:17 +01:00
Andrew Kelley
0353c9601a
Merge pull request #7814 from LemonBoy/fix-7760
...
std: Fixed pipe2 fallback
2021-01-18 11:49:42 -08:00
Julian Maingot
4c5f69a065
update error return doc
...
Docs were out of sync with code
2021-01-18 11:04:33 -08:00
Zander Khan
ce22c70586
Change compareFn to fn (a: T, b: T) std.math.Order
2021-01-18 19:02:11 +00:00
LemonBoy
6418f9ae91
std: Add missing cast when calling fcntl w/ constant args
...
comptime_int arguments are a big no no.
2021-01-18 18:02:09 +01:00
LemonBoy
f33bac2b12
std: define pipe2 only for os that support it
2021-01-18 17:24:26 +01:00
LemonBoy
9d18df142c
std: Fixed pipe2 fallback
...
Use both F_SETFD and F_SETFL depending on what flag we're setting.
Closes #7760
2021-01-18 14:52:35 +01:00
Zander Khan
5bfd9238de
Remove resize. Adding uninitialized memory at the end of the items would break the heap property.
2021-01-17 14:43:38 +00:00
Zander Khan
9a09ebb1b9
Replace shrink with shrinkAndFree and shrinkRetainingCapacity
2021-01-17 14:41:20 +00:00
Andrew Kelley
8436134499
std.ArrayHashMap: add "AssertDiscard" function variants
...
* Add `swapRemoveAssertDiscard`
* Add `orderedRemoveAssertDiscard`
* Deprecate `removeAssertDiscard`
2021-01-16 22:49:20 -07:00
Andrew Kelley
1f65828ec6
Merge pull request #7716 from koachan/sparc64-libs
...
stage1: SPARCv9 f128 enablement
2021-01-16 12:10:03 -08:00
Zander Khan
e1ab425bce
Fix slice length when updating
2021-01-16 18:43:13 +00:00
Zander Khan
c6986f29f9
Fix update might change an element no longer in the queue
2021-01-16 18:11:26 +00:00
Zander Khan
4600b489a6
Rename heap to queue in tests for consistency
2021-01-16 18:09:44 +00:00
Zander Khan
4d09803414
Fix edge cases in fromOwnedSlice
2021-01-16 18:06:44 +00:00
Zander Khan
a162a21947
Ensure we cannot remove an item outside the current length of the queue
2021-01-16 17:52:14 +00:00
Zander Khan
ecee1cae45
Remove magic number
2021-01-16 17:48:55 +00:00
Zander Khan
94c47855ec
Add missing import
2021-01-16 17:48:29 +00:00
Zander Khan
349ccc0bd0
Add license to top of file
2021-01-16 17:48:14 +00:00
Zander Khan
a727a508cd
std: Add Priority Dequeue
2021-01-16 12:01:06 +00:00
Guillaume Ballet
f7d7cb6268
crypto: add legacy keccak hash functions
2021-01-15 12:36:38 -08:00
Koakuma
1d67ab8823
Fix _Qp_cmp definition
2021-01-15 19:07:39 +07:00
Koakuma
bbb58b10f6
Add compiler-rt stub for SPARC CPUs
2021-01-15 19:07:38 +07:00
Andrew Kelley
19f893c6bb
std.Thread: avoid compile errors for single-threaded OS's
2021-01-14 22:42:29 -07:00
Andrew Kelley
ad301d687a
fix namespace of kernel32 function calls
2021-01-14 21:42:49 -07:00
Andrew Kelley
9e1aeda3bf
std.Thread.StaticResetEvent: call spinLoopHint appropriately
2021-01-14 21:34:30 -07:00
Andrew Kelley
9698ea3173
std.Thread.Mutex: restore the "Held" API
...
so that std.Thread.Mutex.Dummy can be used as a drop in replacement.
2021-01-14 21:28:22 -07: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
affb57aad9
use interfaces
2021-01-15 10:34:53 +11:00
Asherah Connor
9168b217b2
fix SectionHeaderIterator impl
2021-01-14 17:52:06 +11:00
Asherah Connor
32d69d70cf
expose phdr, shdr parsing
2021-01-14 15:30:28 +11:00
Asherah Connor
49ab6bb429
std.elf: actually pass the pointer
2021-01-14 14:38:52 +11:00
Asherah Connor
1cea88917c
std.elf: call it Header.parse
2021-01-14 14:38:52 +11:00
Asherah Connor
e6cdf9cebf
std.elf: make Header pub
2021-01-14 14:38:52 +11:00
Asherah Connor
23fb19fe41
std.elf: expose parsing decoupled from std.fs.File
2021-01-14 14:38:52 +11: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
Jay Petacat
a021c7b1b2
Move fmt.testFmt to testing.expectFmt
2021-01-12 18:13:29 -08:00
Bill Nagel
2c79d669a7
add missing ECONNRESET from getsockoptError
2021-01-12 18:11:58 -08:00
Andrew Kelley
70c608add8
Merge pull request #7577 from semarie/emutls
...
implement emutls inside compiler_rt.zig
2021-01-12 17:54:02 -08:00
Andrew Kelley
e564d2ca3c
Merge pull request #7714 from mikdusan/target-macos
...
macos: reimplement OS version detection
2021-01-12 16:45:50 -08:00
Bill Nagel
1e2be14b6b
define nfds_t for windows
2021-01-12 16:37:58 -08:00