17 Commits

Author SHA1 Message Date
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