467 Commits

Author SHA1 Message Date
kprotty
ff445814cb
remove wait timeout test cases 2019-11-26 20:40:28 -05:00
kprotty
056b5a26c9
ResetEvent: get abstime based on std.time 2019-11-26 20:40:28 -05:00
kprotty
ca2d566ec8
replace ThreadParker with ResetEvent + WordLock mutex 2019-11-26 20:40:27 -05:00
kprotty
a0955990dc
fix ResetEvent windows bugs 2019-11-26 20:40:04 -05:00
kprotty
ef208fee3c
Definition fixups & ResetEvent test cases 2019-11-26 20:40:04 -05:00
kprotty
9bce97a479
Start on ResetEvent 2019-11-26 20:40:04 -05:00
syscall0
a6ef83cccf Fix build system crash when compiling windows dll 2019-11-26 15:40:31 -05:00
Andrew Kelley
7de138ad7c
std.elf: breaking improvements to the API
and also integration with std.Target.Arch
2019-11-26 14:25:35 -05:00
Benjamin Feng
aca1367533 Optimize binary search algorithm 2019-11-26 13:09:58 -05:00
Vexu
128034481a
solve recursion in self hosted 2019-11-26 18:25:29 +02:00
Jonathan S
ec569ff26a Or in O_DIRECTORY in openDirFlagsC to capture the fact that it is intended for opening directories 2019-11-25 23:46:48 -05:00
Jonathan S
8baf226d69 Add missing shortening of os.windows. 2019-11-25 23:46:48 -05:00
Jonathan S
4014a8e4b4 Avoid deprecated cwd-based functions for opening directories, preferring to open explicitly relative to Dir.cwd(). 2019-11-25 23:46:48 -05:00
Jonathan S
001334266a Don't pass FILE_LIST_DIRECTORY in openDirTraverseW. 2019-11-25 23:46:48 -05:00
Jonathan S
51c5740879 Use a specific access mask in Dir.openDirListW instead of a generic one. Untested.
The actual desired access mask in this case seems quite confusing and badly documented. The previous combination of `GENERIC_READ` and `SYNCHRONIZE` seems both illegal and redundant according to the [`ntifs.h` documentation](https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntcreatefile), which specifies that `GENERIC_READ` should not be used for directories and includes `SYNCHRONIZE`. `winnt.h` contains a number of relevant-sounding flags such as `FILE_ADD_FILE`, `FILE_ADD_SUBDIRECTORY`, and `FILE_DELETE_CHILD` that do not show up in documentation at all. These are equal in value to file-specific flags that are documented as flags you should not specify when opening a directory.
2019-11-25 23:46:47 -05:00
Jonathan S
07120c8745 Use O_PATH where available in std.fs.Dir.openPathTraverse. 2019-11-25 23:46:47 -05:00
Jonathan S
17bc1f62a5 Split std.fs.Dir.openDir into openDirList and openDirTraverse to clarify what directories can be iterated. Closes ziglang/zig#3741.
The Windows-inspired nomenclature of "List" and "Traverse" was chosen over POSIX-style "Read" and "Path" (from `O_PATH`) for clarity. Using "Path" makes it look like the function is manipulating strings, and the generic "Read" ending isn't useful when there is no generic read method. Even in implementation details, `read` is never used.

Actual exploitation of the difference between the two functions will come in a later commit.
2019-11-25 23:46:47 -05:00
daurnimator
c0cb676745 std: refactor std/debug.zig DwarfInfo operations to be methods 2019-11-25 22:49:46 -05:00
Andrew Kelley
f8a2dec243
docs: update references to wasm_allocator 2019-11-25 19:30:41 -05:00
Andrew Kelley
4261fa3c49
move logic to the appropriate layers; add new compile error 2019-11-25 18:46:17 -05:00
Andrew Kelley
659c1bdeee
Merge branch 'wasi-run-tests' of https://github.com/fengb/zig into fengb-wasi-run-tests 2019-11-25 17:53:26 -05:00
Andrew Kelley
cb38bd0a14
rename std.heap.direct_allocator to std.heap.page_allocator
std.heap.direct_allocator is still available for now but it is marked
deprecated.
2019-11-25 17:25:06 -05:00
Andrew Kelley
bdf3680be1
zig fmt 2019-11-25 13:53:13 -05:00
Andrew Kelley
8a4c2d3b07
zig fmt fixes for sentinel-terminated pointers
closes #3771
2019-11-25 13:53:06 -05:00
Andrew Kelley
a061ef42c1
Merge pull request #3761 from Vexu/event.fs
Update event.fs to new event loop
2019-11-25 12:31:23 -05:00
Vexu
7dba5ea9cf
update event.fs.watch 2019-11-25 17:57:44 +02:00
Andrew Kelley
5a98dd42b3
Merge pull request #3728 from ziglang/null-terminated-pointers
sentinel-terminated pointers
2019-11-25 02:20:08 -05:00
daurnimator
69b780647a std: update for linux 5.4 2019-11-25 02:07:23 -05:00
Andrew Kelley
321726465d
fix freebsd regression 2019-11-25 02:00:47 -05:00
Andrew Kelley
d2cb740dd9 add missing null terminator in windows file path helper function 2019-11-25 01:10:30 -05:00
Andrew Kelley
29e438fd1f
more sentinel-terminated pointers std lib integration
See #3767
2019-11-25 00:43:36 -05: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
34b1ebefaa
Merge remote-tracking branch 'origin/master' into null-terminated-pointers 2019-11-24 20:28:46 -05:00
daurnimator
1a84bcefb6
std: fix mismatched doc-comment/argument names in fifo.rewind 2019-11-25 09:26:33 +11:00
daurnimator
94485b2a58
std: clean up fifo.readableSliceMut 2019-11-25 09:26:33 +11:00
daurnimator
b4091e3aec
std: fifo.deinit didn't need to take a pointer 2019-11-25 09:26:33 +11:00
daurnimator
3062e0e932
std: add fifo.writeItem 2019-11-25 09:26:33 +11:00
daurnimator
c393969a20
std: fix bug in fifo.unget if rewinding doesn't wrap around 2019-11-25 09:26:33 +11:00
daurnimator
61179a4d52
std: follow zig standard library convention and have fifo.read number of items 2019-11-25 09:26:33 +11:00
daurnimator
6037f89212
std: fifo rename from FixedSizeFifo to LinearFifo 2019-11-25 09:26:33 +11:00
daurnimator
cd749e0416
std: fifo now has 3 modes: Static, Slice and Dynamic 2019-11-25 09:26:32 +11:00
daurnimator
c0e47cb645
std: fix fifo for non-u8 types 2019-11-25 09:26:32 +11:00
daurnimator
e810f485ab
std: add optimization to fifo if size is power of two 2019-11-25 09:26:32 +11:00
daurnimator
01b2a56225
std: move auto_align constant to top of comptime function
At a later point in time this might be made into a parameter
2019-11-25 09:26:32 +11:00
daurnimator
52645d06e1
std: fix unfinished doc-comment in fifo 2019-11-25 09:26:32 +11:00
Andrew Kelley
44b1dc6db8
add type coercion: [:x]T to [*:x]T 2019-11-24 15:17:55 -05:00
syscall0
eea8b10463 Call DllMain entry point if declared 2019-11-24 14:46:22 -05:00
schroffl
6109e49c5b Fix FixedSizeFifo buffer type
Update the `.buf` property to be a slice of the type that is given as a parameter.
2019-11-24 14:42:56 -05:00
Vexu
20f5f56986
uncomment event.fs.watch 2019-11-24 17:42:20 +02:00
Vexu
ab534cc9f1
update event.fs to use global event loop 2019-11-24 17:39:08 +02:00