Commit Graph

26 Commits (5f7b97e84c7e2bc7682510e97996ad30147026d0)

Author SHA1 Message Date
LemonBoy d526b0ffb0 std: Disable _only_ the flaky part of the ResetEvent test
The remaining part is working just fine as it's not time-dependent.
2020-11-19 15:46:20 -07:00
Andrew Kelley 647c6e0d09 tfw you can't even disable a test without getting the logic wrong 2020-11-19 13:28:54 -07:00
Andrew Kelley 238718b93a disable the flaky ResetEvent test
See #7009
2020-11-17 18:08:10 -07:00
Sébastien Marie 678bd4fc89 "ResetEvent" test seems to have a too short timeout: the test is failing randomly on OpenBSD
raise the timeout to 100ms to be sure that if it fails (timeout is returned) it is due to a real problem.
the test shouldn't be longer: it will wait more time only on failure.
2020-11-10 05:29:53 +00:00
Sébastien Marie 9d306e5c77 openbsd: mutex or cond destroy function could return EINVAL 2020-11-10 05:26:35 +00:00
Andrew Kelley 83a1523b1a std.ResetEvent: disable flaky test on Windows
See #7009
2020-11-09 15:33:40 -07:00
Andrew Kelley c923f74fc9 std.ResetEvent: disable flaky test on macOS
See #7009
2020-11-06 16:46:30 -07:00
Jeremy Huffman 9f1639a6bb
Fix std.ResetEvent.timedWait on darwin/macOS. (#6914) 2020-11-06 14:01:52 -05: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
Andrew Kelley 53d011fa1a (breaking) std.time fixups and API changes
Remove the constants that assume a base unit in favor of explicit
x_per_y constants.

nanosecond calendar timestamps now use i128 for the type. This affects
fs.File.Stat, std.time.nanoTimestamp, and fs.File.updateTimes.

calendar timestamps are now signed, because the value can be less than
the epoch (the user can set their computer time to whatever they wish).

implement std.os.clock_gettime for Windows when clock id is
CLOCK_CALENDAR.
2020-05-24 21:40:08 -04:00
Andrew Kelley 2272a07ca0 std.event.Loop: promote the fs thread to be available for all OS's 2020-05-02 00:41:19 -04:00
Andrew Kelley 4616af0ca4
introduce operating system version ranges as part of the target
* re-introduce `std.build.Target` which is distinct from `std.Target`.
   `std.build.Target` wraps `std.Target` so that it can be annotated as
   "the native target" or an explicitly specified target.
 * `std.Target.Os` is moved to `std.Target.Os.Tag`. The former is now a
   struct which has the tag as well as version range information.
 * `std.elf` gains some more ELF header constants.
 * `std.Target.parse` gains the ability to parse operating system
   version ranges as well as glibc version.
 * Added `std.Target.isGnuLibC()`.
 * self-hosted dynamic linker detection and glibc version detection.
   This also adds the improved logic using `/usr/bin/env` rather than
   invoking the system C compiler to find the dynamic linker when zig
   is statically linked. Related: #2084
   Note: this `/usr/bin/env` code is work-in-progress.
 * `-target-glibc` CLI option is removed in favor of the new `-target`
   syntax. Example: `-target x86_64-linux-gnu.2.27`

closes #1907
2020-02-28 14:51:53 -05:00
daurnimator 7cf0b02ab4
NTSTATUS is a non-exhaustive enum 2020-01-31 22:33:17 +11:00
LemonBoy 563d9ebfe5 Implement the callconv() annotation 2020-01-02 18:53:16 +01:00
kprotty 1c5a1284e3 typo fix 2019-12-22 21:45:26 -06:00
kprotty b8fabb3426 ResetEvent: broadcast by default 2019-12-22 21:45:26 -06:00
kprotty c912296443 SpinLock: loopHint & yield distinction 2019-12-17 15:38:00 -06:00
kprotty 26e08d5701 ResetEvent: use futex on linux when possible 2019-12-17 15:38:00 -06:00
kprotty e67ce444e7 ResetEvent: simpler interface + fix tests 2019-12-17 15:38:00 -06:00
Robin Voetter 4b4fbe3887
Replace @typeOf with @TypeOf in all zig source
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-12-10 11:09:41 -05:00
Robin Voetter d568db2386
Remove misplaced dot 2019-12-10 11:09:29 -05:00
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 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