Commit Graph

25 Commits (a4eaeee72011a2f7866a18420812178991feaf8d)

Author SHA1 Message Date
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
Benjamin Feng c1fb97aef6 Remove unnecessary allocator from mutex 2020-01-30 00:27:44 -06:00
Andrew Kelley 53913acaf7
zig fmt and update `extern fn` to `callconv(.C)` 2020-01-06 15:34:50 -05:00
Andrew Kelley 0a9daeb37e
Merge branch 'cc-work' of https://github.com/LemonBoy/zig into LemonBoy-cc-work 2020-01-06 14:07:56 -05:00
Andrew Kelley 6ea193946d
Merge pull request #3950 from nmichaels/master
Document std.Mutex.
2020-01-03 20:05:03 -05:00
LemonBoy 563d9ebfe5 Implement the callconv() annotation 2020-01-02 18:53:16 +01:00
kprotty b8fabb3426 ResetEvent: broadcast by default 2019-12-22 21:45:26 -06:00
Nathan Michaels 45339aec02 Fix wording on deinit. 2019-12-21 01:30:55 -05:00
Nathan Michaels 33b5dbb82c Document std.Mutex.
Not sure what the build platform is for the generated documentation,
and it's worth thinking about how best to deal with this pattern. It
might be worth figuring out how to rewrite this to have a single
definition of the public API with the implementation chosen at compile
time.
2019-12-19 23:42:27 -05:00
kprotty c912296443 SpinLock: loopHint & yield distinction 2019-12-17 15:38:00 -06:00
kprotty ac5ba27c2b Mutex: fix lock/spin bugs, improve perf slightly & more specialization 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
kprotty ca2d566ec8
replace ThreadParker with ResetEvent + WordLock mutex 2019-11-26 20:40:27 -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
Vexu 5194fc57d1
use enum with atomics in std lib 2019-11-12 17:55:54 +02:00
Andrew Kelley 2723ffc2b2
fixups and zig fmt 2019-11-08 01:52:23 -05:00
kprotty 12e68cbeb6 pthread_sched_yield -> sched_yield 2019-11-07 16:33:25 -06:00
kprotty b535e86cc0 move SpinLock definitions around 2019-11-07 15:32:20 -06:00
kprotty c9db420a09 Adaptive Mutex:
- uses std.ThreadParker
- supports static initialization (deprecates StaticallyInitializedMutex)
2019-11-05 16:14:43 -06:00
Tse 00382f6dae DragonFlyBSD tidyup 2019-10-31 13:53:32 -04:00
Andrew Kelley 6a15e8a7a7
add comments to disabled tests linking to the tracking issue 2019-10-30 21:29:45 -04:00
Tse 33cc204481 DragonFlyBSD support 2019-10-30 21:21:58 -04:00
Andrew Kelley ed36dbbd9c
mv std/ lib/
that's all this commit does. further commits will fix cli flags and
such.

see #2221
2019-09-25 23:35:41 -04:00